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

Distributed log splitting deleteNode races against splitLog retry

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.92.0, 0.94.0
    • 0.92.0
    • wal
    • None
    • Reviewed

    Description

      Recently, during 0.92 rc testing, we found distributed log splitting hangs there forever. Please see attached screen shot.
      I looked into it and here is what happened I think:

      1. One rs died, the servershutdownhandler found it out and started the distributed log splitting;
      2. All three tasks failed, so the three tasks were deleted, asynchronously;
      3. Servershutdownhandler retried the log splitting;
      4. During the retrial, it created these three tasks again, and put them in a hashmap (tasks);
      5. The asynchronously deletion in step 2 finally happened for one task, in the callback, it removed one
      task in the hashmap;
      6. One of the newly submitted tasks' zookeeper watcher found out that task is unassigned, and it is not
      in the hashmap, so it created a new orphan task.
      7. All three tasks failed, but that task created in step 6 is an orphan so the batch.err counter was one short,
      so the log splitting hangs there and keeps waiting for the last task to finish which is never going to happen.

      So I think the problem is step 2. The fix is to make deletion sync, instead of async, so that the retry will have
      a clean start.

      Async deleteNode will mess up with split log retrial. In extreme situation, if async deleteNode doesn't happen
      soon enough, some node created during the retrial could be deleted.

      deleteNode should be sync.

      Attachments

        1. patch_for_92.txt
          1 kB
          Jimmy Xiang
        2. patch_for_92_v3.txt
          2 kB
          Jimmy Xiang
        3. patch_for_92_v2.txt
          2 kB
          Jimmy Xiang
        4. hbase-5081-patch-v7.txt
          4 kB
          Jimmy Xiang
        5. hbase-5081-patch-v6.txt
          2 kB
          Jimmy Xiang
        6. HBASE-5081-jira-Distributed-log-splitting-deleteNode.patch
          37 kB
          Ted Yu
        7. hbase-5081_patch_v5.txt
          2 kB
          Jimmy Xiang
        8. hbase-5081_patch_for_92_v4.txt
          2 kB
          Jimmy Xiang
        9. distributed-log-splitting-screenshot.png
          58 kB
          Jimmy Xiang
        10. distributed_log_splitting_screenshot3.png
          286 kB
          Jimmy Xiang
        11. distributed_log_splitting_screen_shot2.png
          125 kB
          Jimmy Xiang
        12. 5081-deleteNode-with-while-loop.txt
          31 kB
          Ted Yu
        13. 0001-HBASE-5081-jira-Distributed-log-splitting-deleteNode.patch
          29 kB
          Prakash Khemani
        14. 0001-HBASE-5081-jira-Distributed-log-splitting-deleteNode.patch
          29 kB
          Prakash Khemani
        15. 0001-HBASE-5081-jira-Distributed-log-splitting-deleteNode.patch
          29 kB
          Prakash Khemani
        16. 0001-HBASE-5081-jira-Distributed-log-splitting-deleteNode.patch
          32 kB
          Prakash Khemani
        17. 0001-HBASE-5081-jira-Distributed-log-splitting-deleteNode.patch
          33 kB
          Prakash Khemani
        18. 0001-HBASE-5081-jira-Distributed-log-splitting-deleteNode.patch
          34 kB
          Prakash Khemani
        19. 0001-HBASE-5081-jira-Distributed-log-splitting-deleteNode.patch
          38 kB
          Prakash Khemani

        Issue Links

          Activity

            People

              khemani Prakash Khemani
              jxiang Jimmy Xiang
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: