Skip to content
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

Send to exact match only when notify in poller #537

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Conversation

dfarr
Copy link
Member

@dfarr dfarr commented Jan 24, 2025

No description provided.

@dfarr dfarr requested a review from avillega January 24, 2025 01:23
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.

Project coverage is 56.09%. Comparing base (bbb848a) to head (4da723b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/app/subsystems/aio/sender/sender.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #537      +/-   ##
==========================================
+ Coverage   56.02%   56.09%   +0.06%     
==========================================
  Files         129      129              
  Lines       13923    13928       +5     
==========================================
+ Hits         7801     7813      +12     
+ Misses       5659     5653       -6     
+ Partials      463      462       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -305,6 +306,11 @@ func (w *PollWorker) Process(mesg *aio.Message) {
return
}

if mesg.Type == message.Notify && conn.id != data.Id {
mesg.Done(false, fmt.Errorf("no connection found for group %s and id %s", data.Group, data.Id))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that not being able to deliver a notify message is not an error in that our guarantee is "at most once", should we return success here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering the exact same thing!

The reason I went with an error is so that the sender subsystem could retry notify messages if we ever want to do an enqueue retry loop (but still go directly to completed on successful enqueue). I figure the poller in the sdk may lose and re-establish a connection from time to time so it is possible that at one moment there is no active connection and later there is where the sdk instance itself did not actually restart.

@dfarr dfarr merged commit 1735b6c into main Jan 29, 2025
5 of 6 checks passed
@dfarr dfarr deleted the feature/notify-unicast branch January 29, 2025 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants