[Tarantool-patches] [PATCH v4 1/3] gc/xlog: delay xlog cleanup until relays are subscribed
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Thu Mar 25 22:59:53 MSK 2021
> Here is an update on top. I see a few red tests on our github actions
> but still trying to figure out what is happening, since I've been
> passing the tests on my local instance
> ---
> diff --git a/src/box/box.cc b/src/box/box.cc
> index a269f7357..ab298d223 100644
> --- a/src/box/box.cc
> +++ b/src/box/box.cc
> @@ -774,10 +774,18 @@ box_check_wal_queue_max_size(void)
> static double
> box_check_wal_cleanup_delay(void)
> {
> + const double MAX_TIMEOUT = TIMEOUT_INFINITY;
> + const double MIN_TIMEOUT = 0.001;
I am going to repeat it here from what I said verbally and
in the chat - don't restrict the timeout. We never restrict
any timeouts. TIMEOUT_INFINITY is not literally double inf
value. It is just some huge but valid double value. User in
his code can have a bigger definition of what is infinity.
The same with the min. Why do you limit it from below? I don't
see a single reason for doing so. Only reasons against that -
it is inconsistent with the other timeouts we have, and might
conflict with how each particular user understand the "minimal"
timeout.
Instead, I asked you to check what if I pass Lua's math.huge
value. AFAIK, it is not some finite double value, and it might
break something.
> +
> double value = cfg_getd("wal_cleanup_delay");
> - if (value < 0) {
> + if (value < 0 || (value != 0 && value < MIN_TIMEOUT) ||
> + value > MAX_TIMEOUT) {
> + char message[64];
> + snprintf(message, sizeof(message),
> + "the value must be 0 or in range [%g; %g]",
> + MIN_TIMEOUT, TIMEOUT_INFINITY);
> diag_set(ClientError, ER_CFG, "wal_cleanup_delay",
> - "the value must be >= 0");
> + message);
> return -1;
> }
>
More information about the Tarantool-patches
mailing list