File tree Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Original file line number Diff line number Diff line change 31
31
(j/execute! conn [(str " CREATE TABLE IF NOT EXISTS " table-name
32
32
" (id INT NOT NULL PRIMARY KEY,
33
33
count INT NOT NULL)" )]))
34
- (sql/insert! conn table-name {:id 0 :count 0 }))
34
+ (sql/insert! conn table-name {:id 0 :count 0 })
35
+ (let [table (clojure.string/upper-case table-name)]
36
+ (j/execute! conn [(str " SELECT LUA('return box.space." table " :alter{ is_sync = true } or 1')" )])))
35
37
(assoc this :conn conn :node node)))
36
38
37
39
(invoke! [this test op]
Original file line number Diff line number Diff line change 37
37
(setup! [this test node]
38
38
(let [conn (cl/open node test)]
39
39
(assert conn)
40
- (cl/with-conn-failure-retry conn
41
- (j/execute! conn [(str " CREATE TABLE IF NOT EXISTS " table-name
42
- " (id INT NOT NULL PRIMARY KEY,
43
- value INT NOT NULL)" )]))
40
+ (if (= node (jepsen/primary test))
41
+ (cl/with-conn-failure-retry conn
42
+ (j/execute! conn [(str " CREATE TABLE IF NOT EXISTS " table-name
43
+ " (id INT NOT NULL PRIMARY KEY,
44
+ value INT NOT NULL)" )])
45
+ (let [table (clojure.string/upper-case table-name)]
46
+ (j/execute! conn [(str " SELECT LUA('return box.space." table " :alter{ is_sync = true } or 1')" )]))))
44
47
(assoc this :conn conn :node node)))
45
48
46
49
(invoke! [this test op]
Original file line number Diff line number Diff line change 26
26
27
27
(setup! [this test node]
28
28
(let [conn (cl/open node test)]
29
- (assert conn)
30
- (cl/with-conn-failure-retry conn
31
- (j/execute! conn [(str " CREATE TABLE IF NOT EXISTS " table-name
32
- " (id INT NOT NULL PRIMARY KEY AUTOINCREMENT,
33
- value INT NOT NULL)" )]))
34
- (assoc this :conn conn :node node)))
29
+ (assert conn)
30
+ (if (= node (jepsen/primary test))
31
+ (cl/with-conn-failure-retry conn
32
+ (j/execute! conn [(str " CREATE TABLE IF NOT EXISTS " table-name
33
+ " (id INT NOT NULL PRIMARY KEY AUTOINCREMENT,
34
+ value INT NOT NULL)" )])
35
+ (let [table (clojure.string/upper-case table-name)]
36
+ (j/execute! conn [(str " SELECT LUA('return box.space." table " :alter{ is_sync = true } or 1')" )]))))
37
+ (assoc this :conn conn :node node)))
35
38
36
39
(invoke! [this test op]
37
40
(let [[k v] (:value op)]
You can’t perform that action at this time.
0 commit comments