-
Notifications
You must be signed in to change notification settings - Fork 410
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
debug!( | ||
uuid = retry_req.uuid, | ||
?op, | ||
pattern = ?retry_req.pattern, "Matched retry request"); |
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.
Added more informative debug messages so we know which requests and patterns are being matched.
I hope this isn't the reason why the endpoint is slow now
|
||
// we only need to lock self.retry_receiver once | ||
{ | ||
let mut retry_receiver = self.retry_receiver.lock().await; |
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.
not sure if this really matters but I think this way, we only lock once instead of on each iteration
|
||
#[tracing_test::traced_test] | ||
#[tokio::test] | ||
async fn test_process_retry_requests_by_id() { |
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.
tests to make sure we aren't retrying all messages
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
drop()
call to transmitterSender
s from being blocked when callingsend()
process_retry_requests
to ensure messages are being matched properly againstMatchingList
Drive-by changes
Related issues
Fixes #4059
Backward compatibility
Testing
Updated unit tests to return a response so the handler is not blocked