Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resharding: cold storage #580

Merged
merged 3 commits into from
Dec 13, 2024
Merged

resharding: cold storage #580

merged 3 commits into from
Dec 13, 2024

Conversation

staffik
Copy link

@staffik staffik commented Dec 13, 2024

No description provided.

@staffik staffik requested a review from a team as a code owner December 13, 2024 08:38
@staffik staffik requested review from wacban and Trisfald and removed request for a team December 13, 2024 08:38
Copy link

@Trisfald Trisfald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@wacban wacban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!


This mapping strategy enables efficient shard management during resharding events,
supporting smooth transitions without altering storage structures directly.

#### Integration with cold storage (archival nodes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: new line after

neps/nep-0568.md Outdated
#### Integration with cold storage (archival nodes)
Cold storage uses the same mapping strategy to manage shard state during resharding:
* When state data is migrated from hot to cold storage, it retains the parent shard’s `ShardUId` prefix, ensuring consistency with the mapping strategy.
* While copying data for the final block of the epoch where resharding occured, the `DBCol::StateShardUIdMapping` column is copied into cold storage. This ensures that mappings are updated alongside the shard state data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word "final" is a bit ambiguous here, can you reword this?

* While copying data for the final block of the epoch where resharding occured, the `DBCol::StateShardUIdMapping` column is copied into cold storage. This ensures that mappings are updated alongside the shard state data.
* These mappings are permanent in cold storage, aligning with its role in preserving historical state.

This approach minimizes complexity while maintaining consistency across hot and cold storage.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also mention that the mapping in cold storage is permanent?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line 164 there is "These mappings are permanent in cold storage".

@staffik staffik requested a review from wacban December 13, 2024 11:30
@staffik staffik merged commit 0ae4721 into resharding Dec 13, 2024
1 check passed
@staffik staffik deleted the stafik/resharding/archive branch December 13, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: NEW
Development

Successfully merging this pull request may close these issues.

3 participants