[JAVA-4637] failed: MongoClientSessionSpecification.should_ignore_unacknowledged_write_concern_when_in_a_transaction Created: 01/Jun/22  Updated: 28/Oct/23  Resolved: 06/Jun/22

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Build Failure Priority: Unknown
Reporter: xgen-buildbaron-user Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: BB-Tools
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-66974 Server responding with unexpected err... Closed
Documentation Changes: Not Needed

 Description   

netty-test on tests-netty__version~6.0_os~linux_topology~replicaset_auth~noauth_ssl~ssl_jdk~jdk8

Host: i-0249bc445d2b3ef03
Project: mongo-java-driver
Commit: 9fcdefd4

Failing Test Logs:

  • com.mongodb.client.MongoClientSessionSpecification.should_ignore_unacknowledged_write_concern_when_in_a_transaction - Logs | History

Task Logs:



 Comments   
Comment by Githook User [ 06/Jun/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Wait for unacknowledged write to complete (#958)

To avoid interference between tests, poll the database until
the unacknowledged write is present in the collection. This
is intended to avoid SnapshotUnavailable errors from being
reported by the server.

JAVA-4637
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/695ce52985fe258245938597e160484fac896259

Comment by Jeffrey Yemin [ 03/Jun/22 ]

The analysis of SERVER-66974 points the way to the root cause and the solution. Basically, there is a test in the same class that does an unacknowledged write to the same collection, and the test does not wait for that write to finish. So it can end up running concurrently with this test and cause this issue to surface. We can work around it in a number of ways, including:

  • Use a different collection for the unacknowledged write test
  • Wait for the unacknowledged write to be acknowledged, by polling for the existence of the document via a query.
Generated at Thu Feb 08 09:02:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.