-
Notifications
You must be signed in to change notification settings - Fork 572
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
perf(shared buffer): divide sync task to kr splits to sync shared buf… #1496
Conversation
6539381
to
c77cd28
Compare
Codecov Report
@@ Coverage Diff @@
## main #1496 +/- ##
============================================
+ Coverage 69.70% 69.87% +0.17%
Complexity 2766 2766
============================================
Files 1042 1042
Lines 91601 91813 +212
Branches 1790 1790
============================================
+ Hits 63851 64158 +307
+ Misses 26859 26764 -95
Partials 891 891
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
4c6425a
to
d7c0b55
Compare
.iter() | ||
.map(|m| Box::new(m.iter()) as BoxedHummockIterator); | ||
MergeIterator::new(iters, stats.clone()) | ||
}; |
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.
I think generating merge iterator on shared buffer batch should also be handled by build_sst_iter
so that this part of code can be reused with compact()
to initiate parallel compaction.
But this can be done in the next refactor.
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.
I think generating merge iterator on shared buffer batch should also be handled by
build_sst_iter
so that this part of code can be reused withcompact()
to initiate parallel compaction.
But this can be done in the next refactor.
seems hard. Giving facts that
build_sst_iter
isasync
Compactor
needs to be cloned and then sent to different closures (and finally different threads)
thus we can't call build_sst_iter
out of closure. But if we call build_sst_iter
inside the closure, build_sst_iter
in shared buffer situation needs a Vec<SharedBufferBatch>
, which is not Arc
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.
Looks good for the rest
d7c0b55
to
7e7463d
Compare
…fers parallel (close #1400)
a84f81e
to
9e3f85f
Compare
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 for the rest. Cool!
9e3f85f
to
bb6ec7d
Compare
…fers parallel (close #1400)
What's changed and what's your intention?
divide sync task to kr splits to sync shared buffers parallel (close #1400)
Checklist
Refer to a related PR or issue link (optional)