Description
TransactionTable.add() first checks if the Hashtable trans contains a transaction with the same id as the one being added. If it does, add() does nothing. If there is no such transaction, a new TransactionTableEntry is created and put into the Hashtable.
I believe that TransactionTable.add() is never called on a transaction that has already been added to the table. If this is the case, there's no point in checking the Hashtable first. Instead, we could just create a new TransactionTableEntry and add it unconditionally. This would reduce the number of (synchronized) Hashtable calls and could improve the performance in scenarios like the one described in DERBY-3092.
Attachments
Attachments
Issue Links
- is related to
-
DERBY-4517 Unnecessary synchronization in TransactionTable.add()
- Open
- relates to
-
DERBY-3092 Use java.util.concurrent in TransactionTable to improve scalability
- Closed