-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Remove assertion for verbose result #1835
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
Conversation
driver-core/src/main/com/mongodb/internal/operation/ClientBulkWriteOperation.java
Outdated
Show resolved
Hide resolved
driver-core/src/main/com/mongodb/internal/operation/ClientBulkWriteOperation.java
Outdated
Show resolved
Hide resolved
| fail(writeModel.getClass().toString()); | ||
| } | ||
| if (okFieldValue == 1) { | ||
| collectSuccessfulIndividualOperationResult( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TODO comments made the method larger and harder to follow. To keep the control flow maintainable, I moved one of the logical branches into a separate method. This keeps the main if/else structure concise and makes each path easier to identify and understand.
…tBulkWriteOperationTest.java Co-authored-by: Copilot <[email protected]>
stIncMale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
driver-core/src/main/com/mongodb/internal/operation/ClientBulkWriteOperation.java
Outdated
Show resolved
Hide resolved
driver-core/src/main/com/mongodb/internal/operation/ClientBulkWriteOperation.java
Outdated
Show resolved
Hide resolved
driver-core/src/main/com/mongodb/internal/operation/ClientBulkWriteOperation.java
Outdated
Show resolved
Hide resolved
driver-core/src/main/com/mongodb/internal/operation/ClientBulkWriteOperation.java
Show resolved
Hide resolved
driver-core/src/test/unit/com/mongodb/internal/operation/ClientBulkWriteOperationTest.java
Outdated
Show resolved
Hide resolved
driver-core/src/main/com/mongodb/internal/connection/DualMessageSequences.java
Show resolved
Hide resolved
driver-core/src/test/unit/com/mongodb/internal/operation/ClientBulkWriteOperationTest.java
Outdated
Show resolved
Hide resolved
- Remove an assertion that was failing due to server bug SERVER-113344 where successful operation results are unexpectedly returned in the cursor when verbose results are disabled. - Add unit tests for JAVA-6001 and JAVA-5986. JAVA-6001 JAVA-5986 --------- Co-authored-by: Ross Lawley <[email protected]> (cherry picked from commit 96d0c6b)
This PR addresses server bug SERVER-113344 by modifying the client-side bulk write operation handling to work around unexpected server responses.
The changes:
JAVA-6001
JAVA-5986