-
Notifications
You must be signed in to change notification settings - Fork 68
feat: Make all Worker channels metered #711
Conversation
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.
Awesome conversion!
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.
Great work @huitseeker , thanks for doing this!
@@ -164,7 +162,7 @@ impl Synchronizer { | |||
|
|||
// Add the digest to the waiter. | |||
let deliver = digest; | |||
let (tx_cancel, rx_cancel) = channel(1); | |||
let (tx_cancel, rx_cancel) = mpsc::channel(1); |
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.
Ah probably those could be oneshot channels? (not concern of this PR of course - but something to keep in mind)
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.
They usually can't: this is a cancellation handler, and the branches of the tokio::select
that GC and those that unpack items in waiting race each other. The GC might then try to cancel an item that's already delivered (and the delivery sinks the receiving end of the channel). With a oneshot channel, that may lead to a panic.
b23c0a9
to
3d9a3c6
Compare
This is an extension of MystenLabs#682 to the worker
3d9a3c6
to
f6dae11
Compare
This is an extension of MystenLabs#682 to the worker
This is an extension of #682 to the worker
This is an extension of #682 to the worker
This is an extension of MystenLabs/narwhal#682 to the worker
This is an extension of #682 to the worker