You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check MongoException for lables TransientTransactionError, UnknownTransactionCommitResult indicating potentially recoverable transaction commit errors and translate them to TransientDataAccessException.
See MongoException#hasErrorLabel(String).
Issue Links:
DATAMONGO-2075 Open up MongoTransaction manager to allow transaction commit retry.
DATAMONGO-2075 doesn't solve the problem entirely as some transaction errors can be thrown prior to a transaction commit operation.
WriteConflicts are one example:
1.begintx2.updatedocumenty3.committx
If another thread/user modifies document y after beginning the transaction and before updating the document, an exception will be thrown on line 2 and not line 3
We do not have means to represent the dimension of contextual transient exceptions. If we would wrap certain exceptions into a TransientException wrapper, then calling code would not be able to handle the actual exception type. Also, conditionally using a different exception type would introduce a different behavior potentially breaking existing application code.
As there is no other means of adding the information, we suggest using MongoExceptionTranslator.isTransientFailure.
Christoph Strobl opened DATAMONGO-2073 and commented
Check
MongoException
for lablesTransientTransactionError, UnknownTransactionCommitResult
indicating potentially recoverable transaction commit errors and translate them toTransientDataAccessException
.See
MongoException#hasErrorLabel(String)
.Issue Links:
DATAMONGO-2075 Open up MongoTransaction manager to allow transaction commit retry.
DATAMONGO-2291 MongoExceptionTranslator hides WriteConflicts
Referenced from: pull request #605
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: