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(concat delete iterator): prefetch for concat delete range iterator #9693

Closed
wants to merge 1 commit into from

Conversation

soundOfDestiny
Copy link
Contributor

@soundOfDestiny soundOfDestiny commented May 9, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

background: #9517 (comment)
However, when read_options.ignore_range_tombstone == false, concat delete range iterator will usually request for SstableMeta of an SST earlier than SstableMeta of the same SST is requested for by concat iterator.
Therefore, in such situation, prefetching in ConcatDeleteRangeIterator is meaningful and prefetching in ConcatIterator is meaningless.

This PR makes ConcatDeleteRangeIterator prefetch one extra SSTableMeta every time it requests for an SSTableMeta.

This PR maintains a prefetch queue (prefetched_metas: VecDeque) for SSTableMetas that have already been prefetched.

Checklist For Contributors

  • 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)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

  • I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

  • My PR DOES NOT contain user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Merging #9693 (573bb5e) into main (0ff65d1) will decrease coverage by 0.03%.
The diff coverage is 30.23%.

@@            Coverage Diff             @@
##             main    #9693      +/-   ##
==========================================
- Coverage   70.97%   70.95%   -0.03%     
==========================================
  Files        1241     1241              
  Lines      207703   207826     +123     
==========================================
+ Hits       147412   147453      +41     
- Misses      60291    60373      +82     
Flag Coverage Δ
rust 70.95% <30.23%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
...rage/src/hummock/iterator/delete_range_iterator.rs 79.76% <0.00%> (-2.96%) ⬇️
...c/hummock/iterator/concat_delete_range_iterator.rs 64.94% <24.74%> (-20.34%) ⬇️
src/storage/src/hummock/sstable_store.rs 67.66% <60.00%> (-0.53%) ⬇️

... and 8 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@soundOfDestiny soundOfDestiny deleted the zl_concat_prefetch branch May 10, 2023 08:14
@soundOfDestiny
Copy link
Contributor Author

#9517 (comment)

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.

1 participant