-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
Aldrin Seychell opened SPR-11761 and commented
This issue started when we noticed a number of missing data in our database and not matching our reports, all resulting from a particular thread. This problem was being triggered after utilizing the TransactionSynchronizationManager.registerSynchronization
method and implementing the afterCompletion
method to trigger a separate transaction to perform some further logic afterwards. However, when calling a method annotated with a @Transactional(propagation=NEVER)
, this seems to be corrupting the threadLocal variables and the transactional resources being tied to thread indefinitely. Any subsequent calls from this thread to persist new data will never reach the database but will never fail.
Affects: 3.1.1, 4.0.4
Reference URL: spring-attic/spring-framework-issues#74
Attachments:
- 0001-SPR-11761.patch (2.60 kB)
Issue Links:
- TransactionSynchronizationManager - throw an Exception or log a warning if a Synchronization wants to add a Synchronization and afterCompletion is already called [SPR-11590] #16214 TransactionSynchronizationManager - throw an Exception or log a warning if a Synchronization wants to add a Synchronization and afterCompletion is already called ("duplicates")
- When using Programatic transaction management of SPR if the developer misses to commit or rollback the transaction ; when the thread is returned from pool next time the stale transaction is returned. [SPR-13789] #18362 When using Programatic transaction management of SPR if the developer misses to commit or rollback the transaction ; when the thread is returned from pool next time the stale transaction is returned.
Referenced from: commits spring-attic/spring-framework-issues@8945dd9, spring-attic/spring-framework-issues@41578e8
1 votes, 4 watchers