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: configurable record batches in flight #759

Merged

Conversation

ShiKaiWi
Copy link
Member

Which issue does this PR close?

Closes #735

Rationale for this change

Currently, streaming reading sst has already been supported. However, the max record batches in flight is not configurable, which is hard-coded as 1024. This pr makes it configurable, especially for normal query and compaction reading.

What changes are included in this PR?

  • Make scan_max_record_batches_in_flight configurable;
  • Refactor the implementation for Stream based on a future method;

Are there any user-facing changes?

A new config options is provided called `scan_max_record_batches_in_flight.

How does this change test

Existing tests.

@ShiKaiWi ShiKaiWi marked this pull request as draft March 23, 2023 10:39
@ShiKaiWi ShiKaiWi marked this pull request as ready for review March 24, 2023 04:24
@codecov-commenter
Copy link

Codecov Report

Merging #759 (2569487) into main (99f2cf4) will decrease coverage by 0.01%.
The diff coverage is 96.47%.

❗ Current head 2569487 differs from pull request most recent head 6585f8c. Consider uploading reports for the commit 6585f8c to get more accurate results

@@            Coverage Diff             @@
##             main     #759      +/-   ##
==========================================
- Coverage   68.20%   68.19%   -0.01%     
==========================================
  Files         296      296              
  Lines       46057    46066       +9     
==========================================
+ Hits        31411    31415       +4     
- Misses      14646    14651       +5     
Impacted Files Coverage Δ
analytic_engine/src/instance/mod.rs 83.33% <ø> (ø)
tools/src/bin/sst-convert.rs 1.20% <0.00%> (ø)
analytic_engine/src/instance/flush_compaction.rs 92.68% <95.00%> (+0.04%) ⬆️
analytic_engine/src/instance/read.rs 78.15% <97.26%> (+3.15%) ⬆️
analytic_engine/src/compaction/scheduler.rs 74.41% <100.00%> (+0.22%) ⬆️
analytic_engine/src/instance/open.rs 80.52% <100.00%> (+0.58%) ⬆️
analytic_engine/src/lib.rs 98.79% <100.00%> (+0.01%) ⬆️
analytic_engine/src/row_iter/dedup.rs 94.32% <100.00%> (+0.04%) ⬆️
analytic_engine/src/row_iter/merge.rs 92.79% <100.00%> (-0.55%) ⬇️
analytic_engine/src/row_iter/mod.rs 100.00% <100.00%> (+9.09%) ⬆️
... and 3 more

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jiacai2050 jiacai2050 self-requested a review March 24, 2023 06:38
Copy link
Contributor

@jiacai2050 jiacai2050 left a comment

Choose a reason for hiding this comment

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

LGTM

@ShiKaiWi ShiKaiWi added this pull request to the merge queue Mar 24, 2023
Merged via the queue into apache:main with commit 8a9635e Mar 24, 2023
@ShiKaiWi ShiKaiWi deleted the feat-configurable-record-batches-in-flight branch March 24, 2023 08:06
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* feat: make max_record_batches_in_flight configurable

* chore: make scan_batch_size works only for iterators

* chore: use separate scan options for compaction

* chore: fix clippy warnings

* chore: refactor implement stream for batch of streams

* chore: stop poll after input stream is exhausted in sst writer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue: streaming building/reading SST
3 participants