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:
Patryk Jędrzejczak
2026-03-12 14:56:45 +01:00
parent 2d22eea2f9
commit f85628a9a0

View File

@@ -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;
}