Skip to content

Commit 34fedf8

Browse files
committed
temporary commit
Closes #16 Closes #17 Closes #21 Closes #25 Closes #34
1 parent 636e1d2 commit 34fedf8

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

src/tarantool/db.clj

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,31 @@
246246
(stop! test node)
247247
(wipe! test node))
248248

249+
;db/Primary
250+
;(setup-primary! [_ test node])
251+
252+
;(primaries [_ test]
253+
; (->> (node-state test)
254+
; (filter (comp #{:leader} :role))
255+
; (map :node)))
256+
257+
db/Process
258+
(start! [_ test node]
259+
(start! node {}))
260+
;{:initial-cluster-state (if @(:initialized? test)
261+
; :existing
262+
; :new)
263+
; :nodes @(:members test)}))
264+
265+
(kill! [_ test node]
266+
(c/su
267+
;(cu/stop-daemon! binary pidfile)))
268+
(cu/grepkill! :kill "tarantool")))
269+
270+
db/Pause
271+
(pause! [_ test node] (c/su (cu/grepkill! :stop "tarantool")))
272+
(resume! [_ test node] (c/su (cu/grepkill! :cont "tarantool")))
273+
249274
db/LogFiles
250275
(log-files [_ test node]
251276
[logfile])))

src/tarantool/runner.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118

119119
(def crash-pattern
120120
"An egrep pattern we use to find crashes in the Tarantool logs."
121-
"Segmentation fault|too long WAL write|F>")
121+
"Segmentation fault|too long WAL write|F>|ER_TUPLE_FOUND")
122122

123123
(defn logged-crashes
124124
"Takes a test, and returns a map of nodes to strings from their Tarantool logs

src/tarantool/sets.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[checker :as checker]
77
[generator :as gen]
88
[independent :as independent]]
9+
[clojure.tools.logging :refer [info warn]]
910
[next.jdbc :as j]
1011
[next.jdbc.sql :as sql]
1112
[tarantool.client :as cl]
@@ -38,7 +39,9 @@
3839
(cl/with-txn-aborts op
3940
(case (:f op)
4041
:add (let [con (cl/open (jepsen/primary test) test)]
41-
(do (sql/insert! con table-name {:value v})
42+
(info (jepsen/primary test))
43+
;(do (sql/insert! con table-name {:value v})
44+
(do (j/execute! con [(str "INSERT INTO " table-name "(value) VALUES (" v ")")])
4245
(assoc op :type :ok)))
4346

4447
:read (->> (sql/query conn [(str "SELECT * FROM " table-name)])

0 commit comments

Comments
 (0)