-
Notifications
You must be signed in to change notification settings - Fork 412
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
feat: return # of messages prioritized in the queue when calling message retry endpoint #5132
base: main
Are you sure you want to change the base?
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5132 +/- ##
=======================================
Coverage 77.53% 77.53%
=======================================
Files 103 103
Lines 2110 2110
Branches 190 190
=======================================
Hits 1636 1636
Misses 453 453
Partials 21 21
|
96a33bb
to
831a111
Compare
…age retry endpoint
1bbd92f
to
5255925
Compare
dcbee31
to
f2fc9f1
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.
haven't looked at any logic just a driveby
|
||
use super::op_queue::OpQueue; | ||
use super::op_queue::OperationPriorityQueue; | ||
|
||
pub const SUBMITTER_QUEUE_COUNT: usize = 3; |
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.
can we add a comment as to why this is important? is there any way we can make sure that e.g. tests fail if this ever becomes stale?
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.
Yep, can add comment. Technically there is a way to test this with capacity() and permits
https://docs.rs/tokio/latest/tokio/sync/mpsc/struct.Sender.html#method.capacity
But I think that would require us to refactor OpSubmitter in a way that is easily testable via unittests
Description
Add a mpsc channel between relayer and message retry handler, so message retry handler knows the retry results from the relayer.
POST /message_retry
endpoint now returns a JSON with details on the retry request:New changes
Sender
s from being blocked when callingsend()
process_retry_requests
to ensure messages are being matched properly againstMatchingList
SUBMITTER_QUEUE_COUNT = 3
Drive-by changes
Related issues
Fixes #4059
Backward compatibility
Testing
Updated unit tests to return a response so the handler is not blocked