-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: 3.6.0
-
Component/s: Write Operations
-
None
I am getting UnsupportedOperationException when using retryable writes with col.findOneAndUpdate(find, update, new FindOneAndUpdateOptions().returnDocument(AFTER)).
java.lang.UnsupportedOperationException: null
at com.mongodb.internal.connection.NoOpSessionContext.advanceTransactionNumber(NoOpSessionContext.java:63)
at com.mongodb.operation.BaseFindAndModifyOperation.addTxnNumberToCommand(BaseFindAndModifyOperation.java:129)
at com.mongodb.operation.FindAndUpdateOperation$1.create(FindAndUpdateOperation.java:365)
at com.mongodb.operation.CommandOperationHelper$4.call(CommandOperationHelper.java:451)
at com.mongodb.operation.OperationHelper.withReleasableConnection(OperationHelper.java:419)
at com.mongodb.operation.CommandOperationHelper.executeRetryableCommand(CommandOperationHelper.java:445)
at com.mongodb.operation.BaseFindAndModifyOperation.execute(BaseFindAndModifyOperation.java:69)
at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:193)
at com.mongodb.client.internal.MongoCollectionImpl.executeFindOneAndUpdate(MongoCollectionImpl.java:743)
at com.mongodb.client.internal.MongoCollectionImpl.findOneAndUpdate(MongoCollectionImpl.java:723)