Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-17894 make sure all tests without unsafe pass
  3. HBASE-17872

The MSLABImpl generates the invaild cells when unsafe is not availble

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None
    • Reviewed

    Description

      We will get the wrong position of buffer in multithreaded environment, so the method makes the invalid cell in MSLAB.

        public static int copyFromBufferToBuffer(ByteBuffer in, ByteBuffer out, int sourceOffset,
            int destinationOffset, int length) {
          if (in.hasArray() && out.hasArray()) {
            // ...
          } else if (UNSAFE_AVAIL) {
            // ...
          } else {
            int outOldPos = out.position();
            out.position(destinationOffset);
            ByteBuffer inDup = in.duplicate();
            inDup.position(sourceOffset).limit(sourceOffset + length);
            out.put(inDup);
            out.position(outOldPos);
          }
          return destinationOffset + length;
        }
      

      Attachments

        1. HBASE-17872.v0.patch
          8 kB
          Chia-Ping Tsai
        2. HBASE-17872.v1.patch
          12 kB
          Chia-Ping Tsai
        3. HBASE-17872.v2.patch
          12 kB
          Chia-Ping Tsai
        4. HBASE-17872.v3.patch
          13 kB
          Chia-Ping Tsai
        5. HBASE-17872.v4.patch
          14 kB
          Chia-Ping Tsai

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: