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

Reverse Scan threw StackOverflow caused by readPt checking

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.98.14, 1.3.0, 2.0.0
    • 1.3.0, 0.98.16, 2.0.0, 1.2.7
    • None
    • None
    • Reviewed

    Description

      I met stack overflow error in StoreFileScanner.seekToPreviousRow using reversed scan. I searched and founded HBASE-14155, but it seems to be a different reason.

      The seekToPreviousRow will fetch the row which closest before, and compare mvcc to the readPt, which acquired when scanner created. If the row's mvcc is bigger than readPt, an recursive call of seekToPreviousRow will invoked, to find the next closest before row.

      Considering we created a scanner for reversed scan, and some data with smaller rows was written and flushed, before calling scanner next. When seekToPreviousRow was invoked, it would call itself recursively, until all rows which written after scanner created were iterated. The depth of recursive calling stack depends on the count of rows, the stack overflow error will be threw if the count of rows is large, like 10000.

      Attachments

        1. HBASE-14497-master-v5.patch
          9 kB
          Yerui Sun
        2. HBASE-14497-master-v4.patch
          9 kB
          Yerui Sun
        3. HBASE-14497-master-v3.patch
          6 kB
          Yerui Sun
        4. HBASE-14497-master-v3.patch
          6 kB
          Yerui Sun
        5. HBASE-14497-master-v2.patch
          6 kB
          Yerui Sun
        6. HBASE-14497-master.patch
          6 kB
          Yerui Sun
        7. HBASE-14497-branch-1-v6.patch
          10 kB
          Yerui Sun
        8. HBASE-14497-branch-1-v3.patch
          10 kB
          Yerui Sun
        9. HBASE-14497-branch-1-v2.patch
          6 kB
          Yerui Sun
        10. HBASE-14497-branch-1.patch
          6 kB
          Yerui Sun
        11. HBASE-14497-0.98-v6.patch
          10 kB
          Yerui Sun
        12. HBASE-14497-0.98.patch
          6 kB
          Yerui Sun
        13. 14497-master-v6.patch
          9 kB
          Ted Yu
        14. 14497-branch-1-v6.patch
          10 kB
          Ted Yu

        Activity

          People

            sunyerui Yerui Sun
            sunyerui Yerui Sun
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: