-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clusterversion,storage: add explicit version for split user keys
Pebble ceased splitting user keys across multiple sstables in a single level in cockroachdb/pebble@a860bbad. A Pebble format major version was added in 22.1 to mark existing tables with split user that formed an "atomic compaction unit" for compaction. The compaction to recombine the split keys happens at a low priority within Pebble, so there is no guarantee that these tables have been recombined. Pebble range key support depends on having split user keys recombined. As such, the Pebble migration to upgrade to a version that support range keys must first perform a blocking migration to compact tables with split user keys. Currently, the Cockroach cluster version `EnsurePebbleFormatVersionRangeKeys` ratchets the Pebble version through both the split user keys migration, up to the version that supports range keys. Strictly speaking, the Pebble format version migration will take care of the sequencing. However, to provide better visibility into the various Pebble migrations, and to cater for the fact that the split user keys migration may take some time to recombine the necessary tables, a dedicated cluster version for the split keys migration is added. This dedicated cluster version makes it unambiguous what's blocking the Cockroach version finalization. Release note (backward-incompatible change, ops change): A cluster version is added to allow Pebble to recombine certain SSTables (specifically, user keys that are split across multiple files in a level of the LSM). Recombining the split user keys is required for supporting the range keys feature. The migration to recombine the SSTables is expected to be short (split user keys are rare in practice), but will block subsequent migrations until all tables have been recombined. The `storage.marked-for-compaction-files` time series metric can show the progress of the migration. Close #84012.
- Loading branch information
Showing
5 changed files
with
41 additions
and
28 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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