-
Notifications
You must be signed in to change notification settings - Fork 181
RUST-360 Streaming monitoring protocol #721
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
Changes from 26 commits
532cc0d
4b73ca5
ee8ef91
bf3df4c
210f54d
99be868
5f480e6
5a0ba19
8bde2f8
11e0de9
5e9f7d3
2f699d4
88b477a
f4a1ca9
4281d67
80fee99
28fd38b
077c8ac
8b3470e
a0a6c25
091368e
aa9a8d4
c0e6163
b69fadb
74d9737
d2e20e3
1af37d4
04c8172
45f5fe7
33cda59
30a59c5
b5ecdd1
fd74070
30fa783
cde696c
983a5d6
b7b655f
0b63cff
857bacd
8aef7a0
a098cfc
05648ab
84bff34
6f37cc8
dce4fb3
f8e24a8
a5e6eff
77a57f8
cd5141a
7945fbe
ee41d36
d73f1ef
082ebc8
8325cb9
79bd04e
2d0d9bb
2b34813
bfab549
946064a
446afd8
5fc4389
6a91a89
c1ab640
5304a1e
cae749c
de8fdc3
94753a9
9175ea1
7daa603
38cba5f
cb57d92
34751a0
35cb043
21504b6
796797c
33f5ab0
0c485d9
a542eef
a643820
b987ff4
90eed60
11a27d7
c92da56
0cdaf21
23da1b1
2c1bd80
d7e7bc1
712d460
24018ad
cd2eabf
2fabe8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,17 +38,11 @@ impl PoolManager { | |
} | ||
|
||
/// Mark the pool as "ready" as per the CMAP specification. | ||
pub(super) async fn mark_as_ready(&self) { | ||
let (message, acknowledgment_receiver) = AcknowledgedMessage::package(()); | ||
if self | ||
.sender | ||
.send(PoolManagementRequest::MarkAsReady { | ||
_completion_handler: message, | ||
}) | ||
.is_ok() | ||
{ | ||
acknowledgment_receiver.wait_for_acknowledgment().await; | ||
} | ||
/// | ||
/// Since management requests are treated with the highest priority by the pool and will be | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I updated the pool worker task to use a biased There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As it turns out, this wasn't completely race-proof, so I reverted back to waiting for acknowledgment. |
||
/// processed before all others, there's no need to wait for acknowledgment. | ||
pub(super) fn mark_as_ready(&self) { | ||
let _ = self.sender.send(PoolManagementRequest::MarkAsReady); | ||
} | ||
|
||
/// Check in the given connection to the pool. | ||
|
@@ -108,9 +102,7 @@ pub(super) enum PoolManagementRequest { | |
}, | ||
|
||
/// Mark the pool as Ready, allowing connections to be created and checked out. | ||
MarkAsReady { | ||
_completion_handler: AcknowledgedMessage<()>, | ||
}, | ||
MarkAsReady, | ||
|
||
/// Check in the given connection. | ||
CheckIn(Box<Connection>), | ||
|
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.
The monitors now handle emitting these events, so we don't need to pipe these event handlers down into the handshaker anymore.
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.
nice, this may make things easier for SDAM logging too 😇