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.
spanconfig: support rangefeeds for dynamic system tables
Fixes cockroachdb#73045. We're running out of system table IDs (see cockroachdb#57531), and as a result we're now introducing the notion of dynamic system IDs throughout the system. Previously KV baked-in the assumption of static system IDs at two points: - When deciding to allow rangefeeds on a given range; - When enforcing strict GC TTL; It did so by decoding the range's key span and comparing against the hard-coded maximum system ID, all to determine whether the range in question contained system tables. If so, we allowed rangefeeds to be declared over it, and also did not enforce strict GC TTL (only really applies to user tables). This way of doing things does not compose with dynamically allocated system table IDs. With arbitrary, possibly non-contiguous IDs, we don't have the convenient key-comparison properties to rely on. To that end, we use the span configs infrastructure to to delegate control of whether rangefeeds are enabled over a given range and whether strict GC is enforced. This scheme allows SQL code to declare "system table configs" over arbitrary schemas, and have KV still respect it. This PR does not expose these span config settings as part of zone configs -- there's no need to (though we could in the future). To account for the asynchronous nature of the span configs infra, we need to ensure that ranges without an available config default to enabling rangefeeds. Release note: None
- Loading branch information
1 parent
4b14bdb
commit a475ea7
Showing
19 changed files
with
686 additions
and
543 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
Oops, something went wrong.