[PartitionStore] Enable use-multi-db-layout for multi-db transition#4789
Open
AhmedSoliman wants to merge 3 commits into
Open
[PartitionStore] Enable use-multi-db-layout for multi-db transition#4789AhmedSoliman wants to merge 3 commits into
AhmedSoliman wants to merge 3 commits into
Conversation
This was referenced May 21, 2026
Test Results 8 files ± 0 8 suites ±0 2m 41s ⏱️ - 2m 4s Results for commit 7ba29a6. ± Comparison against base commit ec29d04. This pull request removes 17 tests.♻️ This comment has been updated with latest results. |
ec88124 to
7ba29a6
Compare
The strategy is to allow nodes to start with `RESTATE_WORKER__USE_MULTI_DB_LAYOUT=true` when empty and they'll provision their partition store with the multi-db layout. The layout choice is persisted in the cluster marker and on future runs, it will be used as the source of truth. This makes it safe to enable this option on all nodes of a cluster safely, only new nodes will respect it. If/when we need to support a migration from single-db to multi-db layout, we'll trigger this transition on node startup and update the marker accordingly. This makes the migration compatible with older nodes. - Persist the database layout choice (single-db vs multi-db) in the cluster marker on first provisioning, so nodes consistently open partition stores under the layout the cluster was created with. The layout flag flows from the `ClusterMarker` returned by `validate_or_create` into `PartitionStoreManager`, which uses it to compute per-partition `DbName`s. - All existing tests have been updated to use the new `use_multi_db_layout` to increase confidence. - Record the cluster fingerprint in the marker on provisioning. Not consumed yet — lays the groundwork for validating that a node's data directory belongs to the cluster it is being asked to join. - Remove the `db_name` field from the sql `partitions`, the field isn't useful in investigations and will require some plumbing if we want to keep it. I deemed it to be not worth the effort.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The strategy is to allow nodes to start with
RESTATE_WORKER__USE_MULTI_DB_LAYOUT=truewhen emptyand they'll provision their partition store with the multi-db layout. The layout choice is persisted
in the cluster marker and on future runs, it will be used as the source of truth. This makes it safe
to enable this option on all nodes of a cluster safely, only new nodes will respect it.
If/when we need to support a migration from single-db to multi-db layout, we'll trigger this transition
on node startup and update the marker accordingly. This makes the migration compatible with older nodes.
Persist the database layout choice (single-db vs multi-db) in the cluster
marker on first provisioning, so nodes consistently open partition stores
under the layout the cluster was created with. The layout flag flows from
the
ClusterMarkerreturned byvalidate_or_createintoPartitionStoreManager, which uses it to compute per-partitionDbNames.All existing tests have been updated to use the new
use_multi_db_layoutto increase confidence.Record the cluster fingerprint in the marker on provisioning. Not
consumed yet — lays the groundwork for validating that a node's data
directory belongs to the cluster it is being asked to join.
Remove the
db_namefield from the sqlpartitions, the field isn't useful ininvestigations and will require some plumbing if we want to keep it. I deemed it to be not worth the effort.
Stack created with Sapling. Best reviewed with ReviewStack.