group0: discovery: shorten the pause duration
Nodes currently pause group0 discovery for 1s. This case is always hit while adding multiple nodes in parallel to an empty cluster by all nodes except the one that becomes the group0 leader. This is fine in production, but in tests, the slowdown is quite significant. Every `manager.servers_add(n)` call for n > 1 becomes 1s slower when the cluster is empty. Many cluster tests are affected. In this commit, we decrease the sleep duration from 1s to 100ms to speed up tests. The consequence of this change is that nodes might perform more steps in group0 discovery, but the increase in CPU usage and network traffic should be negligible.
This commit is contained in:
@@ -352,7 +352,7 @@ future<group0_info> persistent_discovery::run(
|
||||
|
||||
if (std::holds_alternative<discovery::pause>(output)) {
|
||||
group0_log.trace("server {} pausing discovery...", my_addr.id);
|
||||
co_await seastar::sleep_abortable(std::chrono::milliseconds{1000}, as);
|
||||
co_await seastar::sleep_abortable(std::chrono::milliseconds{100}, as);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user