atomikos / transactions-essentials

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

Hashtable is overkill for registering transactions. Concurrent HashMap can handle this effectively #198

Open nikhildp opened 10 months ago

nikhildp commented 10 months ago

Reading and writing to tidToTransactionMap_ doesn't have to be synchronised as ConcurrentHashMap is thread safe In action, this leads to a race condition from multiple threads to register a transaction https://github.com/atomikos/transactions-essentials/blob/909422b15000a44088ea09a6f112da9f9cd39c6b/public/transactions/src/main/java/com/atomikos/icatch/imp/TransactionServiceImp.java#L58