-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 7.0.18
-
Component/s: None
-
None
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Running "abortTransaction" shortly after running the first operation in a new transaction can fail to abort the transaction, leaving the transaction open until it times out on the server (transactionLifetimeLimitSeconds, default 60 seconds). During that time, any attempt to modify the same documents in a transaction will result in a write conflict error like
(WriteConflict) Caused by :: Write conflict during plan execution and yielding is disabled. :: Please retry your operation or multi-document transaction.
That scenario can happen when using a driver's WithTransaction API and cancelling the first operation while the driver is reading the response. In that case, the driver will select a different connection and run "abortTransaction". Under certain timing conditions, the "abortTransaction" operation will fail with an error like
(NoSuchTransaction) Given transaction number 55 does not match any in-progress transactions. The active transaction number is 54
However, the transaction is eventually created and left open because the attempt to abort it failed.
See mongo-context-cancel-repro-mattd.zip
for a full repro setup using Docker. See client.log
, diagnostic.data.zip
, and mongod.log.zip
for logs collected from running the repro. See HELP-84441 for the original customer report and background. See GODRIVER-3737 for a proposed mitigation in the Go Driver.
- is related to
-
GODRIVER-3737 Delay AbortTransaction if the callback returns a timeout error in WithTransaction
-
- Backlog
-