Skip to content

Conversation

@vbabanin
Copy link
Member

@vbabanin vbabanin commented Nov 1, 2025

This PR addresses server bug SERVER-113344 by modifying the client-side bulk write operation handling to work around unexpected server responses.

The changes:

  • 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

@vbabanin vbabanin self-assigned this Nov 1, 2025
@vbabanin vbabanin changed the title Remove assertion. Remove assertion for verbose result Nov 1, 2025
@vbabanin vbabanin requested review from rozza and stIncMale November 13, 2025 06:36
fail(writeModel.getClass().toString());
}
if (okFieldValue == 1) {
collectSuccessfulIndividualOperationResult(
Copy link
Member Author

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.

@vbabanin vbabanin requested a review from Copilot November 13, 2025 22:36
@vbabanin vbabanin marked this pull request as ready for review November 13, 2025 22:36
@vbabanin vbabanin requested a review from a team as a code owner November 13, 2025 22:36

This comment was marked as resolved.

Copy link
Member

@stIncMale stIncMale left a comment

Choose a reason for hiding this comment

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

I implemented all the suggestions in 8b4dcb8.

The last reviewed commit is a0b73ba.

@vbabanin vbabanin requested a review from stIncMale December 1, 2025 20:37
@vbabanin vbabanin merged commit 96d0c6b into mongodb:main Dec 3, 2025
56 checks passed
vbabanin added a commit to vbabanin/mongo-java-driver that referenced this pull request Dec 3, 2025
- 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)
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.

3 participants