XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • regionserver, Scanners
    • None
    • Reviewed

    Description

       Lock lock = locks[i];
            lock.lock();
            try {
              ByteBuffer bb = buffers[i];
              if (i == startBuffer) {
                cnt = bufferSize - startBufferOffset;
                if (cnt > len) cnt = len;
                ByteBuffer dup = bb.duplicate();
                dup.limit(startBufferOffset + cnt).position(startBufferOffset);
                mbb[j] = dup.slice();
      

      In asSubByteBuff, we work on the duplicate BB and set limit and position on that.. The locking is not needed here.

      The locking is added because we set limit and position on the BBs in the array. We can duplicate the BBs and do positioning and limit on them. The locking can be fully avoided.

      Attachments

        1. HBASE-15785_V2.patch
          8 kB
          Anoop Sam John
        2. HBASE-15785_V3.patch
          8 kB
          Anoop Sam John
        3. HBASE-15785.patch
          3 kB
          Anoop Sam John

        Activity

          People

            anoop.hbase Anoop Sam John
            anoop.hbase Anoop Sam John
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: