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

feat: split the simple resharding test to separately test the V1 and V2 reshardings #9373

Merged
merged 6 commits into from
Aug 2, 2023

Conversation

wacban
Copy link
Contributor

@wacban wacban commented Aug 1, 2023

Currently the simple resharding test performs two reshardings in a row: V0->V1 and V1->V2. This approach is generally fine but it won't work with the flat storage approach to trie splitting until we also support resharding flat storage. In order to decouple the workstreams and divide them to smaller milestones I'm refactoring the tests so that we can just execute a single resharding and not verify flat storage for the time being.

In this PR I divided the simple test into two smaller test. Each test performs only one resharding.

@wacban wacban marked this pull request as ready for review August 1, 2023 12:06
@wacban wacban requested a review from a team as a code owner August 1, 2023 12:06
}
let shard_id = shard_id as ShardId;

for (i, me) in env.validators.iter().enumerate() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a new addition, why are we adding this now in the test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I discovered that when starting with 4 shards from genesis the validators don't track all shards. I tried to adjust the test to handle that correctly. Eventually I had to give up when I hit the issue with state sync. I'm not going to be fixing that now but we do have it planned for this month. Anyway this code is correct and will make the transition to not all validators tracking all shards easier in the future.

Copy link
Contributor

@aborg-dev aborg-dev left a comment

Choose a reason for hiding this comment

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

LGTM

@wacban wacban merged commit 4efb31f into master Aug 2, 2023
@wacban wacban deleted the waclaw-resharding-split-test branch August 2, 2023 10:09
nikurt pushed a commit that referenced this pull request Aug 24, 2023
…V2 reshardings (#9373)

* feat: splitting the simple resharding test to separately test V1 and V2 reshardings

* devlog

* debugging

* should be fine

* revert debug logging

* rust features are hard
nikurt pushed a commit to nikurt/nearcore that referenced this pull request Aug 24, 2023
…V2 reshardings (near#9373)

* feat: splitting the simple resharding test to separately test V1 and V2 reshardings

* devlog

* debugging

* should be fine

* revert debug logging

* rust features are hard
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

Successfully merging this pull request may close these issues.

3 participants