mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
storage_service: Wait for gossip to settle only if do_bind is set
In commit71bf757b2c, we call wait_for_gossip_to_settle() which takes some time to complete in storage_service::prepare_to_join(). In tests/cql_query_test calls init_server with do_bind == false which in turn calls storage_service::prepare_to_join(). Since in the test, there is only one node, there is no point to wait for gossip to settle. To make the cql_query_test fast again, do not call wait_for_gossip_to_settle if do_bind is false. Before this patch, cql_query_test takes forever to complete. After it takes 10s. Ref #4289. Tests: tests/cql_query_test Message-Id: <3ae509e0a011ae30eef3f383c6a107e194e0e243.1553147332.git.asias@scylladb.com> (cherry picked from commitc0f744b407)
This commit is contained in:
@@ -447,7 +447,9 @@ void storage_service::prepare_to_join(std::vector<inet_address> loaded_endpoints
|
||||
BatchlogManager.instance.start();
|
||||
#endif
|
||||
// Wait for gossip to settle so that the fetures will be enabled
|
||||
gms::get_local_gossiper().wait_for_gossip_to_settle().get();
|
||||
if (do_bind) {
|
||||
gms::get_local_gossiper().wait_for_gossip_to_settle().get();
|
||||
}
|
||||
}
|
||||
|
||||
// Runs inside seastar::async context
|
||||
|
||||
Reference in New Issue
Block a user