[
https://issues.jboss.org/browse/ISPN-1705?page=com.atlassian.jira.plugin....
]
Manik Surtani commented on ISPN-1705:
-------------------------------------
Testing the patch attached to this JIRA. Here are performance numbers based on a
micro-benchmark:
{code}
5.0.1
Created 1,000,000 DummyXids in 1.64 seconds and consumed 1.97 Mb memory
5.1.0.CR3
Created 1,000,000 DummyXids in 7.13 seconds and consumed 1.98 Mb memory
5.1.0-SNAPSHOT
Created 1,000,000 DummyXids in 1.1 seconds and consumed 1.95 Mb memory
{code}
DummyXid should use a better implementation for generating branch and
transaction identifiers
---------------------------------------------------------------------------------------------
Key: ISPN-1705
URL:
https://issues.jboss.org/browse/ISPN-1705
Project: Infinispan
Issue Type: Bug
Components: Transactions
Affects Versions: 5.1.0.CR3
Reporter: Manik Surtani
Assignee: Mircea Markus
Priority: Critical
Fix For: 5.1.0.FINAL
In 5.1.0, the DummyXid was modified to use UUIDs to generate full branch and transaction
identifiers. The most and least significant longs of each UUID was used to populate a
part of a 64-byte array (the rest of the array being set to 0).
This poses a number of problems.
1. Generating 2 UUIDs for each XID is expensive
2. Most of the 64-byte array is set to 0 and wasted
3. XID.hashcode() is implemented by performing Arrays.hashcode on each of the
(mostly-empty) 64-bit arrays
This makes using the DummyTransactionManager (and consequently, the
BatchModeTransactionManager) extremely efficient - if XA compliant.
This JIRA proposes to change this such that:
1. Each transaction manager creates a single UUID as a transaction manager ID
2. Each XID created uses an atomic long for transaction and branch ID
3. Combining most and least significant long of the transaction manager ID with the long
counter can provide both transaction and branch identifiers.
4. Hashcode should be calculated on the above 3 longs ONLY, not the full array, and
should be cached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira