-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
catalog: Simplify shard ID generation (#30597)
The catalog has functionality to deterministically generate a random shard ID for a given environment. It used when we need a shard before the catalog is fully opened. It is strictly worse than generating a totally random shard because we limit the amount of randomness. The catalog also has an un-migratable collection called "settings" which maps string keys to string values. This collection is accessible immediately after reading in a snapshot of the catalog, before we finish opening the catalog. Any shard ID used after reading in the snapshot can be generated fully randomly and stored in the settings collection. Two shards fit into this category: - The builtin migration shard. - The expression cache shard. This commit adds a migration to move both those shards to the settings collection for existing environments. New environments will generate the shards randomly and stash the IDs in the settings collection.
- Loading branch information
Showing
10 changed files
with
240 additions
and
85 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
Oops, something went wrong.