Re: [PATCH v2 1/3] refs/reftable: introduce "reftable.lockTimeout"
- From
James Liu <james@jamesliu.io>
- Date
- Sep 18, 2024, 09:22 UTC
- Message-ID
- <D49ATJ4EIEG0.3A1RCYNFQG0XR@jamesliu.io>
- In-Reply-To
- <700a35df125eca6639d08d30720332dbc1ed15a1.1726633812.git.ps@pks.im>
On Wed Sep 18, 2024 at 2:32 PM AEST, Patrick Steinhardt wrote:
Show 12 quoted lines
> diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c
> index 1c4b19e737f..e90ddfb98dd 100644
> --- a/refs/reftable-backend.c
> +++ b/refs/reftable-backend.c
> @@ -256,6 +256,9 @@ static int reftable_be_config(const char *var, const char *value,
> if (factor > UINT8_MAX)
> die("reftable geometric factor cannot exceed %u", (unsigned)UINT8_MAX);
> opts->auto_compaction_factor = factor;
> + } else if (!strcmp(var, "reftable.locktimeout")) {
> + unsigned long lock_timeout = git_config_ulong(var, value, ctx->kvi);
> + opts->lock_timeout_ms = lock_timeout;
> }Do we need to support the `0` and `-1` values that are possible for the "core.filesRefLockTimeout" and "core.packedRefsTimeout" timeouts here as well?