atomikos / transactions-essentials

Development repository for next major release of
https://www.atomikos.com/Main/TransactionsEssentials
Other
462 stars 139 forks source link

CheckedExportingTransactionManager is not thread-safe #220

Open martinaubele opened 2 months ago

martinaubele commented 2 months ago

In a load test with many concurrent calls we got errors like: "Pending outgoing remote request detected at transaction commit

We found out that CheckedExportingTransactionManager uses a HashMap in an unsafe way. We could fix the problem by changing the line

private static Map<String,PendingRequestSynchronisation> pendingRequestSynchronisation = new HashMap<String,PendingRequestSynchronisation>();

to

private static Map<String,PendingRequestSynchronisation> pendingRequestSynchronisation = new ConcurrentHashMap<String,PendingRequestSynchronisation>();

please see https://github.com/atomikos/transactions-essentials/pull/221