-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Re-implement DistinctCombineOperator to utilize more threads to merge #14714
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14714 +/- ##
============================================
+ Coverage 61.75% 63.89% +2.14%
- Complexity 207 1609 +1402
============================================
Files 2436 2703 +267
Lines 133233 150729 +17496
Branches 20636 23282 +2646
============================================
+ Hits 82274 96308 +14034
- Misses 44911 47228 +2317
- Partials 6048 7193 +1145
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
c4fe425
to
0643417
Compare
0643417
to
10410e4
Compare
// Use the atomic reference as the swap space to merge the results blocks. If the swap space is null, put the new | ||
// results block in it. If the swap space is not null, take the results block from the swap space, and merge it | ||
// with the new results block. Repeat this process until successfully put the new results block in the swap space. | ||
// After all threads are done, the results block in the swap space is the final merged results block. |
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 am not sure how does this help utilize more threads. Can you elaborate ?
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.
This allows all threads to perform the merge. In the old algorithm, the merge is done by a single thread.
On top of #14701
The combine algorithm is as following:
Use an atomic reference as the swap space to merge the results blocks.
Repeat this process until successfully put the new results block in the swap space.
After all threads are done, the results block in the swap space is the final merged results block.