mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-26 19:35:12 +00:00
Currently starting and stopping of b.m. is spread over main(). Keep it close to each other. Another trickery here is that calling b.m.::start() can only be done after joining the cluster, because this start() spawns replay loop which, in turn calls token_metadata::count_normal_token_owners() and if the latter returns zero, the b.m. code uses it as a fraction denominator and crashes. With the above in mind, cql_test_env should start batchlog manager after it "joins the ring" too. For now it doesn't make any difference, but next patch will make use of it. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>