Implement message acknowledgment with retry logic for SignalR#4122
Implement message acknowledgment with retry logic for SignalR#4122imnasnainaec merged 21 commits intomasterfrom
Conversation
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
I've reverted all implementation changes in commit d0119a5 and created a focused plan for solution #1 only (message acknowledgment). The plan now:
The plan is ready for your review. I will not proceed with any implementation until you approve. |
This comment was marked as resolved.
This comment was marked as resolved.
…ortHub Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Implemented message acknowledgment for both MergeHub and ExportHub in commit 2b3f91a. Changes:
All backend tests pass (10/10 MergeController tests). |
This comment was marked as resolved.
This comment was marked as resolved.
I've created a detailed plan for implementing the retry logic with exponential backoff (5s, 10s, 15s intervals). Key components:
The plan is ready for your review. I will not proceed with implementation until approved. |
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Implemented retry logic with acknowledgment tracking in commit ad8d37f. Key changes:
All backend tests pass (10/10 MergeController tests). |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@Backend/Services/AcknowledgmentTracker.cs`:
- Around line 52-82: The SendUntilAcknowledged method currently awaits
Task.Delay before the first send causing unnecessary initial latency; change the
flow in SendUntilAcknowledged so it calls sendMessageAsync immediately (and logs
via logger.LogInformation) on the first attempt, then enter a retry loop that
waits delaySeconds between subsequent attempts and checks IsAcknowledged before
each retry, preserving the existing warning/error logging and sendCount
semantics; locate the method SendUntilAcknowledged and references to
sendMessageAsync, IsAcknowledged, and logger to implement this reordering.
jasonleenaylor
left a comment
There was a problem hiding this comment.
One thing I can't quite track is if the following scenario is problematic:
The connection is interrupted when the client tries to send the acknowledgement back to the server.
So the client received everything properly but the server doesn't realize.
What happens there.
@jasonleenaylor partially reviewed 12 files and made 2 comments.
Reviewable status: 11 of 14 files reviewed, 1 unresolved discussion (waiting on @imnasnainaec).
Backend/Services/AcknowledgmentTracker.cs line 57 at r5 (raw file):
for (int sent = 0; sent <= sendCount; sent++) { await Task.Delay(delaySeconds * 1000);
I see the same thing as code rabbit here, it seems like this should be skipped if sent = 0;
Code quote:
await Task.Delay(delaySeconds * 1000);
imnasnainaec
left a comment
There was a problem hiding this comment.
The backend just logs that it never received an acknowledgement and gives up after 30 seconds.
@imnasnainaec made 2 comments.
Reviewable status: 11 of 14 files reviewed, 1 unresolved discussion (waiting on @coderabbitai and @jasonleenaylor).
Backend/Services/AcknowledgmentTracker.cs line 57 at r5 (raw file):
Previously, jasonleenaylor (Jason Naylor) wrote…
I see the same thing as code rabbit here, it seems like this should be skipped if sent = 0;
Fixed.
This comment was marked as outdated.
This comment was marked as outdated.
imnasnainaec
left a comment
There was a problem hiding this comment.
@imnasnainaec partially reviewed 3 files.
Reviewable status: 7 of 18 files reviewed, all discussions resolved (waiting on @jasonleenaylor).
jasonleenaylor
left a comment
There was a problem hiding this comment.
@jasonleenaylor partially reviewed 14 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @copilot[bot]).
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
This change is
Summary by CodeRabbit
New Features
Bug Fixes