-
Notifications
You must be signed in to change notification settings - Fork 308
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
build: update toolchain to nightly-2024-04-18 #3740
build: update toolchain to nightly-2024-04-18 #3740
Conversation
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
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. Great patch!
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3740 +/- ##
==========================================
- Coverage 85.46% 85.30% -0.16%
==========================================
Files 966 944 -22
Lines 162498 158768 -3730
==========================================
- Hits 138871 135434 -3437
+ Misses 23627 23334 -293 |
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
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.
cc @MichaelScofield @evenyag @v0y4g3r @zhongzc PTAL. |
if let Some(max_value_size) = max_value_size { | ||
if value.len() <= max_value_size { | ||
SplitValue::Single(value) | ||
} else { | ||
SplitValue::Multiple(value.chunks(max_value_size).collect::<Vec<_>>()) | ||
let mut values = vec![]; | ||
for chunk in value.into_iter().chunks(max_value_size).into_iter() { |
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.
@WenyXu Will this introduce additional allocations? The original SplitValue
holds Vec<&[u8]>
.
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.
No. This call into_iter. Actually the previous code has an extra alloc. See https://github.com/GreptimeTeam/greptimedb/pull/3740/files/8d99f8f140daae9fe1e0cebccc30ee8469143bef..b7a57b38f85953d07d4085cf1b3d43986a224e6e#r1571549441.
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.
We move the bytes here. Previously it uses a ref but we can actually take the ownership. This calls delegate to itertools
IntoChunks
, not the slice's chunks
that may clone.
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
clippy.readonly_write_lock = "allow"
. We need to check it afterward.Checklist