Closed staffik closed 3 weeks ago
There is
scan_db_column(
col: &str,
lower_bound: Option<&[u8]>,
upper_bound: Option<&[u8]>,
store: Store)
and it might not be possible to scan child shard only. It is only a debug tool and we probably would need to live with that.
Attention: Patch coverage is 89.65517%
with 6 lines
in your changes missing coverage. Please review.
Project coverage is 71.70%. Comparing base (
99ecfa4
) to head (fee1c6a
). Report is 2 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
core/store/src/lib.rs | 85.71% | 0 Missing and 4 partials :warning: |
core/store/src/adapter/trie_store.rs | 83.33% | 0 Missing and 2 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@wacban @shreyan-gupta I will go offline in a moment. Feel free to merge / take it over, I can continue moving it forward in 10 days.
Ah I just saw your zulip post that the write path will be done separately, ignore my comment about testing it. Just have a look at my comments and fix the CI and we should be good to go.
Tracking issue: https://github.com/near/nearcore/issues/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 fromDBCol::ShardUIdMapping
column every time we accessState
column. The main logic is inStore::get_impl_state()
. These changes implement mapping for reads, writes will be handled in the next PR.Changes:
DBCol::ShardUIdMapping
that is initially empty and will be populated on future resharding events.Store
to createStoreUpdate
.Store::get_impl_state()
- specialget()
implementation for the State column.Next steps (see tracking issue https://github.com/near/nearcore/issues/12050):
copy_state_from_store
incold_storage.rs
.