-
Notifications
You must be signed in to change notification settings - Fork 705
fix(storage): mview scan will miss keys #184
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
Conversation
Signed-off-by: Alex Chi <[email protected]>
TennyZhuang
left a comment
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.
LGTM
Signed-off-by: Alex Chi <[email protected]>
Signed-off-by: Alex Chi <[email protected]>
rust/storage/src/table/mview.rs
Outdated
| .scan_with_start_key(last_key.to_vec(), Some(limit), self.epoch) | ||
| .await?; | ||
| assert!(!self.buf.is_empty()); | ||
| assert_eq!(self.buf.first().as_ref().unwrap().0, last_key); |
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.
| assert_eq!(self.buf.first().as_ref().unwrap().0, last_key); | |
| assert_eq!(buf.first().as_ref().unwrap().0, last_key); |
…-dev into skyzh/fix-missing-key
Signed-off-by: Alex Chi <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #184 +/- ##
============================================
- Coverage 74.49% 74.49% -0.01%
Complexity 2654 2654
============================================
Files 837 837
Lines 47761 47763 +2
Branches 1562 1562
============================================
+ Hits 35581 35582 +1
- Misses 11381 11382 +1
Partials 799 799
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Alex Chi [email protected]
What's changed and what's your intention?
In the original implementation, if we have:
a, ab, bc
and it occurs that the last key we get is
a. next_key(a) =b. We will missab.This PR fixes the bug.
Checklist
Refer to a related PR or issue link (optional)
#62