Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16989

RowProcess#postBatchMutate doesn’t be executed before the mvcc transaction completion

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • None
    • None
    • Reviewed

    Description

      After the HBASE-15158, RowProcess#postBatchMutate will be executed “after” the mvcc transaction completion.

      HRegion#processRowsWithLocks
                // STEP 8. Complete mvcc.
                mvcc.completeAndWait(writeEntry);
                writeEntry = null;
          
                // STEP 9. Release region lock
                if (locked) {
                  this.updatesLock.readLock().unlock();
                  locked = false;
                }
          
                // STEP 10. Release row lock(s)
                releaseRowLocks(acquiredRowLocks);
          
                // STEP 11. call postBatchMutate hook
                processor.postBatchMutate(this);
      
      
      RowProcess#postBatchMutate
        /**
         * The hook to be executed after the process() and applying the Mutations to region. The
         * difference of this one with {@link #postProcess(HRegion, WALEdit, boolean)} is this hook will
         * be executed before the mvcc transaction completion.
         */
        void postBatchMutate(HRegion region) throws IOException;
      

      Do we ought to revamp the comment of RowProcess#postBatchMutate or change the call order?
      I prefer the former, because the HRegion#doMiniBatchMutate() also call postBatchMutate() after the mvcc transaction completion.
      Any comment? Thanks.

      Attachments

        1. HBASE-16989.v4.patch
          10 kB
          Chia-Ping Tsai
        2. HBASE-16989.v3.patch
          10 kB
          Chia-Ping Tsai
        3. HBASE-16989.v2.patch
          16 kB
          Chia-Ping Tsai
        4. HBASE-16989.v1.patch
          16 kB
          Chia-Ping Tsai
        5. HBASE-16989.v0.patch
          15 kB
          Chia-Ping Tsai

        Issue Links

          Activity

            People

              chia7712 Chia-Ping Tsai
              chia7712 Chia-Ping Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: