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.
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
fix(resharding): fix Chain::get_shards_to_state_sync() #12617
fix(resharding): fix Chain::get_shards_to_state_sync() #12617
Changes from all commits
5d43426
b8dfc0c
60185ef
f3d9fea
16aa263
0081ff7
2c5ae77
7f5d2f9
6791325
57ba035
cea603f
4f6067b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<unrelated rant>
Why do we have two names - prev and parent - for the same thing? 😢</unrelated rant>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to for loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the old condition is no longer relevant but the logic here seems too complicated.
In V2 we needed to get a second copy of the parent, even the node tracks it, to perform the preprocessing.
will_care_about_shard && (will_shard_layout_change || !does_care_about_shard)
In V3 this should be needed so it feels like the following should be sufficient:
will_care_about_shard && !does_care_about_shard
Please keep in mind that
will_care_about_shard
is resharding aware. We should aim to keep the resharding specific part of this logic in one place if possible.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, relative to the current PR, something like:
Now that the other PR is merged, we can try the modification to
test_resharding_v3_shard_shuffling_slower_post_processing_tasks
that I mentioned caused a crash:Now unfortunately this passes because something about the order of the test loop task processing for state sync and resharding catchup has changed between when I wrote that and the current head of master. Without trying to figure it out, we can just hack it to run in the same order as before:
Then (with the above epoch length change), run it and you get:
with this error message at the end of the logs:
What's happening here is the problem with
account6
I mentioned in the other comment. It's not tracking the child in the current epoch, will track it in the next, but is performing the split because it tracked the parent in the previous epoch.Yeah it's a bit messy... maybe we should split somethiing out of this?