spring-data-mongodb icon indicating copy to clipboard operation
spring-data-mongodb copied to clipboard

Check MongoException error labels for recoverable transaction errors [DATAMONGO-2073]

Open spring-projects-issues opened this issue 7 years ago • 3 comments
trafficstars

Christoph Strobl opened DATAMONGO-2073 and commented

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-2291 MongoExceptionTranslator hides WriteConflicts

Referenced from: pull request https://github.com/spring-projects/spring-data-mongodb/pull/605

1 votes, 2 watchers

spring-projects-issues avatar Aug 28 '18 08:08 spring-projects-issues

Christoph Strobl commented

Moved to backlog in favor of DATAMONGO-2075

spring-projects-issues avatar Aug 29 '18 15:08 spring-projects-issues

Mark Baker-Munton commented

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. begin tx
2. update document y
3. commit tx 

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

spring-projects-issues avatar Jun 22 '20 17:06 spring-projects-issues

@christophstrobl do you have any plans to fix this issue?

WitekBaranowskiAllegro avatar Nov 09 '23 14:11 WitekBaranowskiAllegro