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

The scanner order for memstore scanners are wrong

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 3.0.0, 2.1.0
    • Component/s: regionserver, Scanners
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      This is comments for KeyValueScanner.getScannerOrder

      KeyValueScanner.java
        /**
         * Get the order of this KeyValueScanner. This is only relevant for StoreFileScanners and
         * MemStoreScanners (other scanners simply return 0). This is required for comparing multiple
         * files to find out which one has the latest data. StoreFileScanners are ordered from 0
         * (oldest) to newest in increasing order. MemStoreScanner gets LONG.max since it always
         * contains freshest data.
         */
        long getScannerOrder();
      

      As now we may have multiple memstore scanners, I think the right way to select scanner order for memstore scanner is to ordered from Long.MAX_VALUE in decreasing order.

      But in CompactingMemStore and DefaultMemStore, the scanner order for memstore scanner is also start from 0, which will be messed up with StoreFileScanners.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tianjingyun Jingyun Tian
                Reporter:
                Apache9 Duo Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: