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

SEEK_NEXT_USING_HINT is ignored on reversed Scans

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha-1, 2.4.5
    • Fix Version/s: 2.5.0, 3.0.0-alpha-2, 2.4.6, 2.3.7
    • Component/s: Filters, scan
    • Labels:
      None
    • Environment:

      Tested, confirmed, and fixed using the in-memory mini-cluster on 64-bit Ubuntu. Originally discovered with the in-memory mini-cluster on RHEL 7 when writing a custom filter for an unrelated project.

    • Hadoop Flags:
      Reviewed

      Description

      It turns out that the SEEK_NEXT_USING_HINT feature is broken for reversed scans. That's because the implementation hard-codes an assumption that the scan is forward.

      Here's the mistake: https://github.com/keyserbrian1/hbase/blob/735bcf85e9b59a71981babe2f5da51978d61d8d3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java#L740

      The bug sneaks past the existing tests because the mistake isn't detectable by looking at the result of a naive reversed scan.

      Attached is a PR that includes a fix and tests designed to detect if filter hints are actually used.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keyserbrian1 Brian Keyser
                Reporter:
                keyserbrian1 Brian Keyser
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: