-
Notifications
You must be signed in to change notification settings - Fork 653
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): do not fail flat storage resharding if account id does not belong to parent #12675
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12675 +/- ##
==========================================
+ Coverage 70.50% 70.52% +0.01%
==========================================
Files 845 845
Lines 172258 172308 +50
Branches 172258 172308 +50
==========================================
+ Hits 121452 121514 +62
+ Misses 45710 45698 -12
Partials 5096 5096
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
error!(target: "resharding", ?new_shard_uid, ?left_child_shard, ?right_child_shard, ?shard_layout, ?account_id, err_msg); | ||
return Err(Error::ReshardingError(err_msg.to_string())); | ||
let err_msg = "account id doesn't map to any child shard! - skipping it"; | ||
warn!(target: "resharding", ?new_shard_uid, ?left_child_shard, ?right_child_shard, ?shard_layout, ?account_id, err_msg); |
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.
Maybe let's use debug_assert
, ideally something that would not silently pass in forknet testing.
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.
The purpose of this PR is to unblock forknet testing though :(
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 with both, can you add a todo to change it to debug_assert once we fix the root cause?
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 will add the todo in a minor PR
If
account_id
of a key does not map to any child (and thus does not belong to the parent in the first place), just log a warning and avoid failing the entire operation.