-
Notifications
You must be signed in to change notification settings - Fork 590
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: workaround decode error caused by large key #8064
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8064 +/- ##
==========================================
+ Coverage 71.32% 71.33% +0.01%
==========================================
Files 1128 1128
Lines 181576 181648 +72
==========================================
+ Hits 129514 129584 +70
- Misses 52062 52064 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
rest LGTM
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.
rest LGTM
…g change add more logs for large key address comments fmt
d4327d0
to
11cb540
Compare
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.
Rest LGTM
@@ -25,6 +25,8 @@ use crate::HummockEpoch; | |||
|
|||
pub const EPOCH_LEN: usize = std::mem::size_of::<HummockEpoch>(); | |||
pub const TABLE_PREFIX_LEN: usize = std::mem::size_of::<u32>(); | |||
// Max length for key overlap and diff length. See KeyPrefix::encode. | |||
pub const MAX_KEY_LEN: usize = u16::MAX as usize; |
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.
entry (kv pair): | overlap len (2B) | diff len (2B) | value len(4B) | diff key | value |
Would it be more intuitive to add format to the 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.
Rest LGTM, thanks for the PR
This is a hotfix to workaround decode error caused by store key larger than 64KB. In the future, we may come up with a better way to prevent large key from occuring in the storage (e.g. limit the state table primary key size). Note that this change breaks the format compatibility but in a very limited manner (only if there are keys with exact len=64KB written prior to this PR). Approved-By: soundOfDestiny Approved-By: wcy-fdu Approved-By: wenym1 Approved-By: Li0k
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This is a hotfix to workaround decode error caused by store key larger than 64KB. In the future, we may come up with a better way to prevent large key from occuring in the storage (e.g. limit the state table primary key size).
Note that this change breaks the format compatibility but in a very limited manner (only if there are keys with exact len=64KB written prior to this PR).
Checklist
- [] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features).- [] I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)./risedev check
(or alias,./risedev c
)Documentation
Click here for Documentation
Types of user-facing changes
Please keep the types that apply to your changes, and remove the others.
Release note