aboutsummaryrefslogtreecommitdiff
path: root/script/jepsen.garage/src
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-10-20 12:56:45 +0200
committerAlex Auvolat <alex@adnab.me>2023-10-20 12:56:55 +0200
commit4b93ce179a3777c8461f3b5843dc3802bddc739c (patch)
treef0dbf38bd5acc380276bfc0a8099ca14b43fa65e /script/jepsen.garage/src
parent4ba18ce9cca1b828edcf3f8c8770d49c75ed3083 (diff)
downloadgarage-4b93ce179a3777c8461f3b5843dc3802bddc739c.tar.gz
garage-4b93ce179a3777c8461f3b5843dc3802bddc739c.zip
jepsen: errors in reg2 workload under investigation
Diffstat (limited to 'script/jepsen.garage/src')
-rw-r--r--script/jepsen.garage/src/jepsen/garage.clj3
-rw-r--r--script/jepsen.garage/src/jepsen/garage/reg.clj30
2 files changed, 22 insertions, 11 deletions
diff --git a/script/jepsen.garage/src/jepsen/garage.clj b/script/jepsen.garage/src/jepsen/garage.clj
index c8865248..be192a7f 100644
--- a/script/jepsen.garage/src/jepsen/garage.clj
+++ b/script/jepsen.garage/src/jepsen/garage.clj
@@ -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})
diff --git a/script/jepsen.garage/src/jepsen/garage/reg.clj b/script/jepsen.garage/src/jepsen/garage/reg.clj
index b5bf28ff..6772abfe 100644
--- a/script/jepsen.garage/src/jepsen/garage/reg.clj
+++ b/script/jepsen.garage/src/jepsen/garage/reg.clj
@@ -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)}))))