0

Mongodb4.4.1, Java Spring中使用注解事务,更新数据时报错,大佬们帮忙看下怎么解决

UncategorizedMongoDbException: Command failed with error 112 (WriteConflict): ‘WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.’ on server 192.168.0.50:27666. The full response is {“errorLabels”: [“TransientTransactionError”], “ok”: 0.0, “errmsg”: “WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.”, “code”: 112, “codeName”: “WriteConflict”, “operationTime”: {“$timestamp”: {“t”: 1612174759, “i”: 170}}, “$clusterTime”: {“clusterTime”: {“$timestamp”: {“t”: 1612174759, “i”: 170}}, “signature”: {“hash”: {“$binary”: “EIEhKuXDIERyIqJ394YakQWRamY=”, “$type”: “00”}, “keyId”: {“$numberLong”: “6875657004925321238”}}}, “recoveryToken”: {}}; nested exception is com.mongodb.MongoCommandException: Command failed with error 112 (WriteConflict): ‘WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.’ on server 192.168.0.50:27666. The full response is {“errorLabels”: [“TransientTransactionError”], “ok”: 0.0, “errmsg”: “WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.”, “code”: 112, “codeName”: “WriteConflict”, “operationTime”: {“$timestamp”: {“t”: 1612174759, “i”: 170}}, “$clusterTime”: {“clusterTime”: {“$timestamp”: {“t”: 1612174759, “i”: 170}}, “signature”: {“hash”: {“$binary”: “EIEhKuXDIERyIqJ394YakQWRamY=”, “$type”: “00”}, “keyId”: {“$numberLong”: “6875657004925321238”}}}, “recoveryToken”: {}}

更改状态以发布