From 4b93ce179a3777c8461f3b5843dc3802bddc739c Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 20 Oct 2023 12:56:45 +0200 Subject: jepsen: errors in reg2 workload under investigation --- script/jepsen.garage/src/jepsen/garage/reg.clj | 30 +++++++++++++++++--------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'script/jepsen.garage/src/jepsen/garage') 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)})))) -- cgit v1.2.3