Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
After implemeting support for suspend\resume operations for pessimistic txs : ticket
thread id still exists in MVCC candidate, but its unused on remote nodes(xid is used instead) and it leads to hard-to-catch bugs. Note that we still need thread ID on local nodes.
In this ticket we should remove completely thread id from MVCC candidate and use another mechanism instead.
Currently, MVCC candidate make use of threadID in the following scenarios:
1)look at the code:
cache.lock(key1).lock();
cache.put(key1, 1);// implicit transaction is started here
Implicit transaction will check whether key is locked explicitly by current thread(thread ID is used here) , see GridNearTxLocal#updateExplicitVersion.
This allows transaction not to gain lock on tx entry, but reuse cache lock.
2) Thread ID is used by explicit transaction to check whether key is locally locked(and throw exception) , see GridNearTxLocal#enlistWriteEntry.
3) Also, thread ID is used to mark candidate as reentry. etc.
Attachments
Issue Links
- is related to
-
IGNITE-5714 Implementation of suspend/resume for pessimistic transactions
- Resolved