Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-8389

Get rid of thread ID in MVCC candidate

    XMLWordPrintableJSON

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

          Activity

            People

              Unassigned Unassigned
              Alexey Kuznetsov Alexey Kuznetsov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: