Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fixed: check existed process before start! a hstream server. It is not idempotent now! #25

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading