jepsen: errors in reg2 workload under investigation

This commit is contained in:
Alex 2023-10-20 12:56:45 +02:00
parent 4ba18ce9cc
commit 4b93ce179a
3 changed files with 41 additions and 17 deletions

View file

@ -35,7 +35,7 @@ lein run test --nodes-file nodes.vagrant --time-limit 64 --rate 50 --concurrenc
### Register linear, without timestamp patch
Command: `lein run test --nodes-file nodes.vagrant --time-limit 60 --rate 20 --concurrency 20 --workload reg --ops-per-key 100`
Command: `lein run test --nodes-file nodes.vagrant --time-limit 60 --rate 20 --concurrency 20 --workload reg1 --ops-per-key 100`
Results: fails with a simple clock-scramble nemesis.
@ -45,7 +45,7 @@ clocks are scrambled.
### Register linear, with timestamp patch
Command: `lein run test --nodes-file nodes.vagrant --time-limit 60 --rate 20 --concurrency 20 --workload reg --ops-per-key 100 -I`
Command: `lein run test --nodes-file nodes.vagrant --time-limit 60 --rate 20 --concurrency 20 --workload reg1 --ops-per-key 100 -I`
Results:
@ -54,9 +54,23 @@ Results:
Explanation: S3 objects are not meant to behave like linearizable registers. TODO explain using a counter-example
### Read-after-write CRDT register model
### Read-after-write CRDT register model, without timestamp patch
Command: `lein run test --nodes-file nodes.vagrant --time-limit 60 --rate 100 --concurrency 100 --workload reg2 --ops-per-key 100`
Results: fails with a simple clock-scramble nemesis.
Explanation: old values are not overwritten correctly when their timestamps are in the future.
### Read-after-write CRDT register model, with timestamp patch
Command: `lein run test --nodes-file nodes.vagrant --time-limit 60 --rate 100 --concurrency 100 --workload reg2 --ops-per-key 100 -I`
Results:
- Failures with clock-scramble nemesis + partition nemesis ???? TODO INVESTIGATE
- TODO: layout reconfiguration nemesis
TODO: determine the expected semantics of such a register, code a checker and show that results are correct
### Set, basic test (write some items, then read)
@ -65,13 +79,12 @@ Command: `lein run test --nodes-file nodes.vagrant --time-limit 60 --rate 100 -
Results:
- For now, no failures with clock-scramble nemesis + partition nemesis
- TODO: layout reconfiguration nemesis
### Set, continuous test (interspersed reads and writes)
TODO
TODO: nemesis that reconfigures the cluster with a different subset of nodes, to have requests that occur during a resync period.
## Investigating (and fixing) wierd behavior

View file

@ -15,7 +15,8 @@
(def workloads
"A map of workload names to functions that construct workloads, given opts."
{"reg" reg/workload
{"reg1" reg/workload1
"reg2" reg/workload2
"set1" set/workload1
"set2" set/workload2})

View file

@ -103,18 +103,10 @@
valid? (empty? (:bad-reads final))]
(assoc final :valid? valid?)))))
(defn workload
"Tests linearizable reads and writes"
(defn workload-common
"Common parts of workload"
[opts]
{:client (RegClient. nil)
:checker (independent/checker
(checker/compose
{:reg-read-after-write (reg-read-after-write)
; linear test is desactivated, indeed Garage is not linear
;:linear (checker/linearizable
; {:model (model/register)
; :algorithm :linear})
:timeline (timeline/html)}))
:generator (independent/concurrent-generator
10
(range)
@ -123,4 +115,22 @@
(gen/mix [op-get op-put op-del])
(gen/limit (:ops-per-key opts)))))})
(defn workload1
"Tests linearizable reads and writes"
[opts]
(assoc (workload-common opts)
:checker (independent/checker
(checker/compose
{:linear (checker/linearizable
{:model (model/register)
:algorithm :linear})
:timeline (timeline/html)}))))
(defn workload2
"Tests CRDT reads and writes"
[opts]
(assoc (workload-common opts)
:checker (independent/checker
(checker/compose
{:reg-read-after-write (reg-read-after-write)
:timeline (timeline/html)}))))