forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…db#96871 cockroachdb#96882 96141: cli: add `--disable-max-offset-check` flag r=erikgrinaker a=erikgrinaker **util/hlc: add `Clock.ToleratedOffset()`** This patch adds `Clock.ToleratedOffset()` which returns the tolerated clock offset as measured via RPC heartbeats before the node will self-terminate. The existing hard-coded 80% tolerated clock skew is moved from `RemoteOffset.isHealth()` to `hlc.NewClock()` and passed in via `rpc.ContextOptions.MaxOffset`. As a consequence of setting `rpc.ContextOptions.MaxOffset` to `ToleratedOffset()` rather than `MaxOffset()`, we now discard RPC clock measurements when the RPC heartbeat round-trip latency exceeds 1.6x of the max offset (2x the tolerated offset), rather than 2x of the max offset. A later commit will rename the `MaxOffset` option to `ToleratedOffset`. Release note: None **rpc: rename `MaxOffset` to `ToleratedOffset`** Mechanical rename, except for changes to a couple of log/error messages. Release note: None **rpc: explicitly allow `ToleratedOffset = 0`** This patch explicitly allows `ToleratedOffset = 0`, which disables RPC clock offset checking and is often done in tests. The relevant code is also unindented. There are no behavioral changes. Release note: None **hlc: add and use `NewClockForTesting()`** This patch adds `NewClockForTesting()`, which returns a clock with no max offset or tolerated offset. It takes a wall clock as a parameter, defaulting to the system clock if `nil`. All appropriate tests have been updated to use it. Release note: None **hlc: add `toleratedOffset` parameter for `NewClock()`** The tolerated offset is computed via `BaseConfig.ToleratedOffset()`, preserving the previous value of 80% of `MaxOffset`. Epic: none Release note: None **cli: add `--disable-max-offset-check` flag** This patch adds a `--disable-max-offset-check` flag, which disables the clock offset check that will self-terminate the node if its offset to the rest of the cluster (as measured via RPC heartbeats) exceeds `--max-offset`. This is motivated by deployments with reliable, high-precision clock infrastructure where `--max-offset` may be set very low (e.g. 10 ms) to reduce undertainty restarts and write latency for global tables. With such low offset limits, RPC latency spikes could cause spurious node restarts. This flag allows operators to assume responsibility for ensuring real clock skew never exceeds `--max-offset`. Resolves cockroachdb#94999. Epic: none Release note (ops change): The flag `--disable-max-offset-check` has been added to disable node self-termination when it detects clock skew with the rest of the cluster beyond `--max-offset`. The operator assumes responsibility for ensuring that real clock skew never exceeds `--max-offset`. 96786: clusterversion: remove replication version gates r=erikgrinaker a=erikgrinaker **clusterversion: remove `AddSSTableTombstones` version gate** Epic: none Release note: None **clusterversion: remove `GCHintInReplicaState` cluster version** Also removes `roachpb.SplitTrigger.WriteGCHint` since we now always write GC hints. Resolves cockroachdb#96760. Epic: none Release note: None 96857: server: fix instance IDs for shared-process tenant servers to node IDs r=dhartunian a=stevendanna We have a number of callers that assume the node ID and instance ID can be used interchangably. In shared-process mode, this has revealed a number of issues that we need to investigate and resolve. This PR, however, papers over those issues to an extent by allowing the shared process tenant servers to inherit the node ID from the server that is starting it. This then ensures that their SQL instance ID is the same as their node ID. I've updated some of the names in NodeIDContainer to make the intended usage more clear. Fixes cockroachdb#84602 Epic: CRDB-14537 Release note: None 96871: kvserver: make clearSubsumedReplicaDiskData movable r=pavelkalinnikov a=tbg We'd like for this to move to `kvstorage` so that it can be unit tested and teased apart for CRDB-220. Epic: CRDB-220 Release note: None 96882: kvserver: extract writeUnreplicatedSST r=pavelkalinnikov a=tbg This PR extracts a standalone method `writeUnreplicatedSST` that can be moved to `kvstorage` at an appropriate time. This is a sister PR to cockroachdb#96871, which does the same to some other SSTs created in `applySnapshot`. Epic: CRDB-220 Release note: None Co-authored-by: Erik Grinaker <[email protected]> Co-authored-by: Steven Danna <[email protected]> Co-authored-by: Tobias Grieger <[email protected]>
- Loading branch information
Showing
124 changed files
with
885 additions
and
790 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.