Skip to content

RUBY-3658 Ensure partial writes are retried #2927

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

Merged
merged 7 commits into from
Apr 25, 2025
Merged

Conversation

jamis
Copy link
Contributor

@jamis jamis commented Apr 24, 2025

Summary

Partial writes were not being retried when a timeout was present, which caused the count of bytes written to be incorrect, because fewer bytes were written to the server than intended. For large payloads (1MB+) this consistently resulted in requests timing out.

@jamis jamis added the bug label Apr 24, 2025
@jamis jamis requested a review from a team as a code owner April 24, 2025 22:31
@jamis jamis requested a review from comandeo-mongo April 24, 2025 22:31
@jamis jamis requested review from alexbevi and removed request for comandeo-mongo April 25, 2025 13:43
alexbevi
alexbevi previously approved these changes Apr 25, 2025
@jamis jamis changed the title HELP-74319 Ensure partial writes are retried RUBY-3658 Ensure partial writes are retried Apr 25, 2025
jamis added 2 commits April 25, 2025 11:49
write() is blocking, but apparently may still not write the
entire requested block (for various reasons). It is safest to
NOT assume it wrote everything, and instead check the return
value for the number of bytes actually written.
@jamis jamis requested a review from alexbevi April 25, 2025 19:47
@jamis jamis merged commit 065a928 into mongodb:master Apr 25, 2025
190 of 206 checks passed
@jamis jamis deleted the help-74319 branch April 25, 2025 20:18
@jamis jamis mentioned this pull request Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants