Skip to content

Commit

Permalink
bug fixed: check existed process before start! a hstream server. It…
Browse files Browse the repository at this point in the history
… is not idempotent now! (#25)
  • Loading branch information
Commelina authored Apr 3, 2024
1 parent c06ce9e commit 9a8f48a
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/jepsen/hstream/kafka/db/hstream.clj
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,22 @@
"But in fact we did nothing here."))

db/Process
;; WARNING: Starting hstream server is not idempotent now.
;; However, the test usually call [:start :all].
;; So we have to check if the server is already running.
;; FIXME: The checking function 'is-hserver-on-node-dead?' is not
;; well implemented...
(start! [this test node]
(c/su
(apply (partial cu/start-daemon!
{:logfile (f-hstream-log-file node)
:pidfile (f-hstream-pid-file node)
:chdir "/"
:make-pidfile? true}
hstream)
(f-hstream-args node))))
(if (legacy-nemesis/is-hserver-on-node-dead? node)
(c/su
(apply (partial cu/start-daemon!
{:logfile (f-hstream-log-file node)
:pidfile (f-hstream-pid-file node)
:chdir "/"
:make-pidfile? true}
hstream)
(f-hstream-args node)))
:skipped-by-us))
(kill! [this test node]
(c/su
(cu/stop-daemon! hstream (f-hstream-pid-file node))))
Expand Down

0 comments on commit 9a8f48a

Please sign in to comment.