Skip to content
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(state-store): fix a full key compare bug in state store get #2237

Merged
merged 1 commit into from
Apr 29, 2022

Conversation

BowenXiao1999
Copy link
Contributor

@BowenXiao1999 BowenXiao1999 commented Apr 29, 2022

What's changed and what's your intention?

PLEASE DO NOT LEAVE THIS EMPTY !!!

Please explain IN DETAIL what the changes are in this PR and why they are needed:

  • Summarize your change (mandatory)
  • How does this PR work? Need a brief introduction for the changed logic (optional)
  • Describe clearly one logical change and avoid lazy messages (optional)
  • Describe any limitations of the current code (optional)

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

@github-actions github-actions bot added the type/fix Bug fix label Apr 29, 2022
Comment on lines 250 to 251
&FullKey::from_slice(&table.key_range.as_ref().unwrap().left)
.into_inner(),
&FullKey::from_user_key_slice(key, epoch).into_inner(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still strange. We need to construct a FullKey and immediately consume it. A lot of copy here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to have a FullKeySlice structure here. https://github.com/dtolnay/ref-cast may help to convert &[u8] into a FullKeySlice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it do not works. Refcast only accept one parameters like &[u8]. However, we get epoch and userkey (&[u8]). No idea how to concatenate them..

@BowenXiao1999 BowenXiao1999 enabled auto-merge (squash) April 29, 2022 08:43
@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #2237 (323575f) into main (20c355e) will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2237      +/-   ##
==========================================
+ Coverage   70.88%   71.02%   +0.14%     
==========================================
  Files         657      657              
  Lines       83141    83592     +451     
==========================================
+ Hits        58936    59375     +439     
- Misses      24205    24217      +12     
Flag Coverage Δ
rust 71.02% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/storage/src/hummock/state_store.rs 71.93% <100.00%> (ø)
src/expr/src/vector_op/agg/general_distinct_agg.rs 65.57% <0.00%> (-2.52%) ⬇️
...c/expr/src/vector_op/agg/general_sorted_grouper.rs 91.21% <0.00%> (-1.88%) ⬇️
src/connector/src/filesystem/file_common.rs 80.00% <0.00%> (-0.89%) ⬇️
src/common/src/types/ordered_float.rs 24.10% <0.00%> (-0.20%) ⬇️
src/batch/src/executor/mod.rs 60.46% <0.00%> (ø)
src/batch/src/executor2/mod.rs 100.00% <0.00%> (ø)
src/expr/src/vector_op/agg/aggregator.rs 89.81% <0.00%> (ø)
src/batch/src/executor/sort_agg.rs
src/batch/src/executor2/sort_agg.rs 93.12% <0.00%> (ø)
... and 2 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@BowenXiao1999 BowenXiao1999 merged commit 1332556 into main Apr 29, 2022
@BowenXiao1999 BowenXiao1999 deleted the bw/fix-a-full-key-compare-bug branch April 29, 2022 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants