-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
-
-
Execution Team 2022-10-31, Execution Team 2022-11-28
-
(copied to CRM)
The log message for MongoDB 6.0 is:
{"t":{"$date":"2022-09-06T15:19:36.865-04:00"},"s":"I","c":"COMMAND","id":51803,"ctx":"conn11","msg":"Slow query","attr":{"type":"command","ns":"test.test","command":{"insert":"test","ordered":true,"$db":"test","lsid":{"id":{"$uuid":"b8d52586-f9d3-4833-aa4a-a2d9b1aa88c1"}},"$clusterTime":{"clusterTime":{"$timestamp":{"t":1662491969,"i":1}},"signature":{"hash":{"$binary":{"base64":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","subType":"0"}},"keyId":0}},"txnNumber":1,"autocommit":false},"ninserted":0,"numYields":0,"ok":0,"errMsg":"WiredTigerIdIndex::_insert: index: _id_; uri: table:index-39-129709413832108471 :: caused by :: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.","errName":"WriteConflict","errCode":112,"reslen":490,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":1,"w":3}},"ReplicationStateTransition":{"acquireCount":{"w":6}},"Global":{"acquireCount":{"r":1,"w":3}},"Database":{"acquireCount":{"w":3}},"Collection":{"acquireCount":{"r":1,"w":3}},"Mutex":{"acquireCount":{"r":39}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"readConcern":{"level":"local","provenance":"clientSupplied"},"storage":{"timeWaitingMicros":{"cache":139271}},"remote":"127.0.0.1:62025","protocol":"op_msg","durationMillis":185}}
Previously (MongoDB 5.0) this was logged as follows (likely due to WT-8290 not being backported):
{"t":{"$date":"2022-09-06T14:41:54.550-04:00"},"s":"I","c":"STORAGE","id":22430,"ctx":"conn5","msg":"WiredTiger message","attr":{"message":"oldest pinned transaction ID rolled back for eviction"}} {"t":{"$date":"2022-09-06T14:41:54.550-04:00"},"s":"I","c":"TXN","id":51802,"ctx":"conn5","msg":"transaction","attr":{"parameters":{"lsid":{"id":{"$uuid":"a5596ab7-9c31-4198-9548-7fc30bd8e61a"},"uid":{"$binary":{"base64":"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=","subType":"0"}}},"txnNumber":1,"autocommit":false,"readConcern":{"level":"local","provenance":"clientSupplied"}},"readTimestamp":"Timestamp(0, 0)","ninserted":29,"keysInserted":29,"terminationCause":"aborted","timeActiveMicros":1240154,"timeInactiveMicros":321842,"numYields":0,"locks":{"ReplicationStateTransition":{"acquireCount":{"w":5}},"Global":{"acquireCount":{"r":1,"w":2}},"Database":{"acquireCount":{"w":2}},"Collection":{"acquireCount":{"w":2}},"Mutex":{"acquireCount":{"r":31}}},"storage":{"data":{"bytesRead":13101},"timeWaitingMicros":{"cache":739459}},"wasPrepared":false,"durationMillis":1561}}
The transactions specification (Interaction with Retryable Writes) indicates that:
In MongoDB 4.0 the only supported retryable write commands within a transaction are `commitTransaction` and `abortTransaction`. Therefore drivers MUST NOT retry write commands within transactions even when `retryWrites` has been enabled on the MongoClient. In addition, drivers MUST NOT add the `RetryableWriteError` label to any error that occurs during a write command within a transaction (excepting `commitTransation` and `abortTransaction`), even when `retryWrites` has been enabled on the MongoClient.
It appears here that the failure isn't with the write itself but updating the indexes. Should this still be labelled as a TransientTransactionError?
Screenshot of the reproduction running in Visual Studio 2022 below:
- depends on
-
SERVER-61909 Hang inserting or deleting document with large number of index entries
- Closed