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

feat(storage): prefix & range utils #3217

Merged
merged 6 commits into from
Jun 15, 2022
Merged

feat(storage): prefix & range utils #3217

merged 6 commits into from
Jun 15, 2022

Conversation

BugenZhao
Copy link
Member

What's changed and what's your intention?

This PR introduces range_of_prefix and prefixed_range utilities to avoid misusing next_key, and also refactors several usages in the relational table.

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
@BugenZhao BugenZhao changed the title feat(storage): prefix to range utils feat(storage): prefix & range utils Jun 14, 2022
@codecov
Copy link

codecov bot commented Jun 14, 2022

Codecov Report

Merging #3217 (42f2993) into main (a42753a) will increase coverage by 0.02%.
The diff coverage is 55.35%.

❗ Current head 42f2993 differs from pull request most recent head 6f77aaf. Consider uploading reports for the commit 6f77aaf to get more accurate results

@@            Coverage Diff             @@
##             main    #3217      +/-   ##
==========================================
+ Coverage   73.52%   73.54%   +0.02%     
==========================================
  Files         744      745       +1     
  Lines      101452   101606     +154     
==========================================
+ Hits        74590    74725     +135     
- Misses      26862    26881      +19     
Flag Coverage Δ
rust 73.54% <55.35%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
src/storage/src/table/cell_based_table.rs 71.12% <25.00%> (-0.55%) ⬇️
src/storage/hummock_sdk/src/key.rs 74.10% <34.48%> (-15.90%) ⬇️
src/storage/src/keyspace.rs 89.69% <100.00%> (ø)
src/storage/src/table/state_table.rs 88.26% <100.00%> (+4.77%) ⬆️
src/storage/src/table/test_relational_table.rs 98.07% <100.00%> (ø)
src/storage/src/table/mem_table.rs 64.51% <0.00%> (-8.07%) ⬇️
...ecutor/managed_state/top_n/top_n_bottom_n_state.rs 77.63% <0.00%> (-5.08%) ⬇️
src/meta/src/hummock/mock_hummock_meta_client.rs 42.85% <0.00%> (-1.10%) ⬇️
...am/src/executor/managed_state/top_n/top_n_state.rs 93.02% <0.00%> (-0.50%) ⬇️
... and 14 more

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

Copy link
Contributor

@wcy-fdu wcy-fdu left a 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: Bugen Zhao <i@bugenzhao.com>
src/storage/hummock_sdk/src/key.rs Outdated Show resolved Hide resolved
@BugenZhao BugenZhao enabled auto-merge (squash) June 15, 2022 05:06
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storage: should check whether next_key is empty
4 participants