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

Avoid deadlock caused by HRegion#doDelta

    XMLWordPrintableJSON

Details

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

    Description

      HRegion.java
      private Result doDelta(Operation op, Mutation mutation, long nonceGroup, long nonce,
            boolean returnResults) throws IOException {
          checkReadOnly();
          checkResources();
          checkRow(mutation.getRow(), op.toString());
          checkFamilies(mutation.getFamilyCellMap().keySet());
          this.writeRequestsCount.increment();
          WriteEntry writeEntry = null;
          startRegionOperation(op);
          List<Cell> results = returnResults? new ArrayList<Cell>(mutation.size()): null;
          RowLock rowLock = getRowLockInternal(mutation.getRow(), false);
          MemstoreSize memstoreSize = new MemstoreSize();
      }
      

      The getRowLockInternal() should be moved inside the try block so that the timeout won't cause the lock leak. Otherwise, we will stuck in HRegion#doClose when closing.

      Attachments

        1. HBASE-17158.v0.patch
          8 kB
          Chia-Ping Tsai
        2. HBASE-17158.v1.patch
          8 kB
          Chia-Ping Tsai
        3. HBASE-17158.v2.patch
          8 kB
          Chia-Ping Tsai

        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: