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

prevRowLock seems not working

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • regionserver
    • None

    Description

      In HRegion.java, getRowLockInternal using prevRowLock to check whether this lock is obtained before, but it may not work as imagine.

      Because this parameter passed as the last lock the thread obtained, and the code always be like this:

      for (byte[] rows: rowsToLock) {
          rowLock = getRowLockInternal(row, prevRowLock);
          if (rowLock != prevRowLock){  
              acquiredRowLocks.add(rowLock);                 
              prevRowLock = rowLock;        
          }
      }

      prevRowLock will never equal to the rowLockContext's lock in getRowLockInternal. I think this parameter is redundant.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Delostik Yi Zheng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified