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

throw away bytes in send buffer after a failed send #368

Merged

Conversation

caleblloyd
Copy link
Collaborator

we have no idea if bytes in send buffer were actually sent on a failed SendAsync

Signed-off-by: Caleb Lloyd <caleb@synadia.com>
@caleblloyd caleblloyd requested a review from mtmk February 2, 2024 19:17
Copy link
Collaborator

@mtmk mtmk left a comment

Choose a reason for hiding this comment

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

LGTM 🎉 thank you :)

@caleblloyd caleblloyd merged commit 72f1213 into 341-send-buffer-refinement Feb 2, 2024
10 checks passed
@caleblloyd caleblloyd deleted the 341-throw-away-failed-send-buffer branch February 2, 2024 19:28
mtmk added a commit that referenced this pull request Feb 2, 2024
* Send buffer refinements

* Command writer pipeline encapsulation

* Default write buffer size

* Revert tmp comment outs

* HPUB writer fix

* Use channel instead of semaphore for locks

* Reuse same pipeline avoiding data loss

* Tidy up

* Reverted ping command

* Revert to clearing buffer

Other NATS clients do the same

* Lock function

* Added inlining

* Command timeouts

* Cancellation fixes

* Derive pool rent size from buffer size option

* Fixed format

* Command timeout test

* Test debug

* Keep send buffer at message boundaries

* Flush buffers cleanly on dispose

* Fixing buffer msg boundry issue

* Format fixed

* Buffer position

* Handle socket exception

* throw away bytes in send buffer after a failed send (#368)

Signed-off-by: Caleb Lloyd <caleb@synadia.com>

---------

Signed-off-by: Caleb Lloyd <caleb@synadia.com>
Co-authored-by: Caleb Lloyd <2414837+caleblloyd@users.noreply.github.com>
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