RUBY-3750 Clarify NoWritesPerformed error label#3016
Merged
comandeo-mongo merged 1 commit intomongodb:masterfrom Apr 13, 2026
Merged
RUBY-3750 Clarify NoWritesPerformed error label#3016comandeo-mongo merged 1 commit intomongodb:masterfrom
comandeo-mongo merged 1 commit intomongodb:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates retryable writes overload backoff behavior to return the correct error when multiple errors are encountered, following the clarified NoWritesPerformed label rules from the retryable writes spec.
Changes:
- Track and raise
error_to_raise(instead of always raising the most recent error) in the overload retry paths based onNoWritesPerformed. - Update diagnostic note attachment to apply to the error that will be raised.
- Add Retryable Writes Prose Test 6 coverage (cases 1–3) for error propagation across multiple errors.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| lib/mongo/retryable/write_worker.rb | Adjusts overload retry loops to select the correct error to raise using NoWritesPerformed rules. |
| spec/mongo/retryable/retryable_writes_error_propagation_prose_spec.rb | Adds new prose spec cases verifying correct error propagation behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jamis
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the overload retry loop encounters multiple errors, the driver now returns the correct error based on NoWritesPerformed labels per the DRIVERS-3326 spec clarification. If all errors indicate no write was attempted, the first error is returned; if mixed, the most recent write-attempted error is returned. Adds three new retryable writes prose tests (spec test 6, cases 1-3).