cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.04k stars 3.8k forks source link

cli: better guardrail against max-offset misconfiguration #128959

Open tbg opened 2 months ago

tbg commented 2 months ago

Is your feature request related to a problem? Please describe.

In a recent issue^1, a user started a single node using --max-offset=5000ms (combined with --disable-max-offset-check) to evaluate performance of an insert workload. However, CRDB really isn't functional with a --max-offset of that magnitude; max offsets must not exceed be a small fraction of the liveness heartbeat interval.

We could've saved a good amount of time diagnosing this had it been impossible to start a server with this value.

Describe the solution you'd like

Refuse to start with --max-offset outside an admissible range.

Describe alternatives you've considered

Additional context

See #127969.

Jira issue: CRDB-41304

tbg commented 2 weeks ago

The issue was filed initially from a report outside of our support process, but now it has also occurred in CRL support^1. Added O-support to reflect that.