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

Remove the KV copy of every KV in Scan; introduced by HBASE-3232

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 0.92.0, 0.94.0
    • Performance, regionserver
    • None
    • Incompatible change, Reviewed

    Description

      Here is offending code from inside in StoreScanner#next:

            // kv is no longer immutable due to KeyOnlyFilter! use copy for safety
            KeyValue copyKv = new KeyValue(kv.getBuffer(), kv.getOffset(), kv.getLength());
      

      This looks wrong given philosophy up to this has been avoidance of garbage-making copies.

      Maybe this has been looked into before and this is the only thing to be done but why is KeyOnlyFilter not making copies rather than mutating originals?

      Making this critical against 0.92.

      Attachments

        1. 3433-v3.txt
          9 kB
          Lars Hofhansl
        2. 3433-v2.txt
          8 kB
          Lars Hofhansl
        3. 3433.txt
          7 kB
          Lars Hofhansl
        4. HBASE-3433-sidenote.patch
          2 kB
          Nicolas Spiegelberg

        Activity

          People

            larsh Lars Hofhansl
            stack Michael Stack
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: