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

refactor: use bounded channel for 3 channels #3273

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

BowenXiao1999
Copy link
Contributor

@BowenXiao1999 BowenXiao1999 commented Jun 16, 2022

What's changed and what's your intention?

ref: #3024

For 3 channels:
FIFO, HASH, BROADCAST

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)

@codecov
Copy link

codecov bot commented Jun 16, 2022

Codecov Report

Merging #3273 (a41dca1) into main (53a49d8) will decrease coverage by 0.00%.
The diff coverage is 6.66%.

@@            Coverage Diff             @@
##             main    #3273      +/-   ##
==========================================
- Coverage   73.23%   73.22%   -0.01%     
==========================================
  Files         747      747              
  Lines      101789   101794       +5     
==========================================
- Hits        74545    74543       -2     
- Misses      27244    27251       +7     
Flag Coverage Δ
rust 73.22% <6.66%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/batch/src/task/broadcast_channel.rs 0.00% <0.00%> (ø)
src/batch/src/task/hash_shuffle_channel.rs 0.00% <0.00%> (ø)
src/batch/src/task/fifo_channel.rs 93.93% <50.00%> (-2.94%) ⬇️
src/meta/src/hummock/mock_hummock_meta_client.rs 41.48% <0.00%> (-1.07%) ⬇️
src/storage/src/hummock/local_version_manager.rs 83.86% <0.00%> (-0.16%) ⬇️

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

Comment on lines +38 to +42
for sender in &self.senders {
sender
.send(chunk.clone())
.to_rw_result_with(|| "BroadcastSender::send".into())
})
.await
.to_rw_result_with(|| "BroadcastSender::send".into())?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we send this in parallel?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I thought about this. What about done this in anthor PR? Prevoius it is also not parallel.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK

@@ -122,17 +123,22 @@ impl HashShuffleSender {
if new_data_chunk.cardinality() > 0 {
self.senders[sink_id]
.send(Some(new_data_chunk))
.await
Copy link
Contributor

Choose a reason for hiding this comment

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

Send it in parallel.

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Let's send data chunk in parallel later.

@BowenXiao1999 BowenXiao1999 merged commit 5d583d5 into main Jun 16, 2022
@BowenXiao1999 BowenXiao1999 deleted the bw/refactor-use-bounded-channels-for-3 branch June 16, 2022 09:55
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.

None yet

3 participants