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

[ReshardingV3] State #12050

Open
staffik opened this issue Sep 5, 2024 · 0 comments
Open

[ReshardingV3] State #12050

staffik opened this issue Sep 5, 2024 · 0 comments

Comments

@staffik
Copy link
Contributor

staffik commented Sep 5, 2024

We agreed to use the mapping strategy (design doc).

Implementation plan:

@staffik staffik changed the title State @staffik [ReshardingV3] State Sep 5, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 11, 2024
Tracking issue: #12050
#### Summary
Currently the changes should be almost no-op, as we do not explicitly
save anything to `DBCol::ShardUIdMapping`.
The only difference is that we make an additional read from
`DBCol::ShardUIdMapping` column every time we access `State` column.
The main logic is in `Store::get_impl_state()`.
These changes implement mapping for reads, writes will be handled in the
next PR.

#### Changes:
- Added `DBCol::ShardUIdMapping` that is initially empty and will be
populated on future resharding events.
- Slight refactor: only allow `Store` to create `StoreUpdate`. 
- `Store::get_impl_state()` - special `get()` implementation for the
State column.

#### Next steps (see tracking issue
#12050):
- Use mapping for writes to db.
- Handle `copy_state_from_store` in `cold_storage.rs`.
- Integration.
- State clean up (e.g. gc parent state when it is no longer referenced
by any child).
- Tests.
github-merge-queue bot pushed a commit that referenced this issue Oct 29, 2024
Tracking issue: #12050

Summary:
- Refactor
`ReshardingManager::process_memtrie_resharding_storage_update()` into
`start_resharding()` as it is an entry point to start resharding.
- Add `set_state_shard_uid_mapping()` and call it from
`start_resharding()`.
- Test that State mapping integrates with resharding flow in
`resharding_v3.rs` testloop.

Test would fail with `MissingTrieValue` for children shards if disabled
`set_state_shard_uid_mapping`.

Perhaps `test_resharding_v3_base` should be as minimal as possible and I
should not test State mapping there. But for now I do not see much value
in doing it differently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant