Files
sailing-analytics/java/com.sap.sailing.domain.racelogtrackingadapter.test
Axel Uhl b63b2591f7 bug5728: countering the com.mongodb.MongoCommandException: Command failed with error 225 (TransactionTooOld) exception
The exception messagewas:
'Retryable write with txnNumber 99 is prohibited on session e77b2b97-ec19-4b13-816a-c9e1a639890b - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= because a newer retryable write with txnNumber 101 has already started on this session.' on server silent:27017. The full response is {"operationTime": {"$timestamp": {"t": 1660252581, "i": 8}}, "ok": 0.0, "errmsg": "Retryable write with txnNumber 99 is prohibited on session e77b2b97-ec19-4b13-816a-c9e1a639890b - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= because a newer retryable write with txnNumber 101 has already started on this session.", "code": 225, "codeName": "TransactionTooOld", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1660252581, "i": 8}}, "signature": {"hash": {"$binary": {"base64": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "subType": "00"}}, "keyId": 0}}}
The problem was most likely that the metadata collection was written by
a separate thread, thus violating the preconditions for using
ClientSession which demands all access to happen through the same
thread. The solution was now to split this into two separate optional
ClientSession objects: one for the fixes, one for the metadata
2022-08-11 23:41:32 +02:00
..
…