Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
10.6.1.0
-
None
-
None
-
Performance
Description
impl.store.raw.xact.TransactionTable.add() has a synchronized block around the code that adds a transaction to the transaction table. It synchronizes on "this".
My understanding of the synchronization in the TransactionTable class is that synchronization on "this" is only used to give a consistent view of the set of update transactions. It is typically used to guard state transitions for transactions from read to update, removal of update transactions from the table, and writing the update transactions to the log during checkpointing.
No transition to/from update happens in this synchronized block (the entry that's added is initialized with the update flag cleared), so I believe that the synchronization could be removed. The code will still be implicitly synchronized on the Hashtable so that it should be safe to access it from multiple threads.
Attachments
Issue Links
- relates to
-
DERBY-3092 Use java.util.concurrent in TransactionTable to improve scalability
- Closed
-
DERBY-4512 Avoid unnecessary lookup in transaction table when adding transaction
- Closed