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

Cells loss or disorder when using family essential filter and partial scanning protocol

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Critical
    • Resolution: Unresolved
    • 1.2.0, 1.1.3
    • None
    • dataloss, Scanners
    • None

    Description

      In RegionScannerImpl, we have two heaps, storeHeap and joinedHeap. If we have a filter and it doesn't apply to all cf, the stores whose families needn't be filtered will be in joinedHeap. We scan storeHeap first, then joinedHeap, and merge the results and sort and return to client. We need sort because the order of Cell is rowkey/cf/cq/ts and a smaller cf may be in the joinedHeap.

      However, after HBASE-11544 we may transfer partial results when we get SIZE_LIMIT_REACHED_MID_ROW or other similar states. We may return a larger cf first because it is in storeHeap and then a smaller cf because it is in joinedHeap. Server won't hold all cells in a row and client doesn't have a sorting logic. The order of cf in Result for user is wrong.

      And a more critical bug is, if we get a LIMIT_REACHED_MID_ROW on the last cell of a row in storeHeap, we will break scanning in RegionScannerImpl and in populateResult we will change the state to SIZE_LIMIT_REACHED because next peeked cell is next row. But this is only the last cell of one and we have two... And SIZE_LIMIT_REACHED means this Result is not partial (by ScannerContext.partialResultFormed), client will see it and merge them and return to user with losing data of joinedHeap. On next scan we will read next row of storeHeap and joinedHeap is forgotten and never be read...

      Attachments

        1. 15398-test.txt
          4 kB
          Phil Yang
        2. HBASE-15398.v1.txt
          27 kB
          Phil Yang
        3. HBASE-15398-v2.patch
          33 kB
          Phil Yang
        4. HBASE-15398-v3.patch
          94 kB
          Phil Yang
        5. HBASE-15398-v4.patch
          86 kB
          Phil Yang
        6. HBASE-15398-v5.patch
          34 kB
          Phil Yang
        7. HBASE-15398-v6.patch
          34 kB
          Phil Yang

        Issue Links

          Activity

            People

              yangzhe1991 Phil Yang
              yangzhe1991 Phil Yang
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: