HBase
  1. HBase
  2. HBASE-4852

Tests that use RegionServer.openRegion such as TestHBaseFsck#testHBaseFsck should call openRegion synchronously

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.92.0, 0.94.0
    • Fix Version/s: None
    • Component/s: regionserver
    • Labels:
      None

      Description

      Certain test cases like HBaseFsck#testHBaseFsck make calls to assign region servers and then read meta. The tests or hbck should be modified to make the RegionServer.openRegion call act synchronously.

      The main issue isn't what is returned, but when. Specifically in HBaseFsck#testHBaseFsck, the first 'hbck -fix', the master makes a call to the regionserver to issue an asynchronous request to open the region (which adds data to meta). The regionserver returns right away. The next hbck call will cause the master query meta again which is used to check consistency. A race is exposed – sometimes the new meta entries are fixed before the second hbck call is done (failing the test), sometimes it is not (not failing).

      The hack in HBASE-4842 introduces a slight delay which usually allows the open request to finish and the meta entry to be updated before the subsequent 'hbck' call.

        Issue Links

          Activity

          Hide
          Jesse Yates added a comment -

          Thanks for the clarification Jon.

          Show
          Jesse Yates added a comment - Thanks for the clarification Jon.
          Hide
          Jonathan Hsieh added a comment -

          Reopening – the point is that the test use the admin client and that it is asynchronous. Options to make these tests more reliable is to either add some mechanism to allow it to get notified or poll for when it is done, or modify tests reaching inside the rs to grab regions (bypassing the handler queue, admin interface) so that the operations are synchrounous.

          Show
          Jonathan Hsieh added a comment - Reopening – the point is that the test use the admin client and that it is asynchronous. Options to make these tests more reliable is to either add some mechanism to allow it to get notified or poll for when it is done, or modify tests reaching inside the rs to grab regions (bypassing the handler queue, admin interface) so that the operations are synchrounous.
          Jonathan Hsieh made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Jesse Yates made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Jesse Yates added a comment -

          HRegionServer.openRegion isn't called from any tests (and in particular testHBaseFsck() doesn't mess with the table directly. Marking as 'fixed'

          Show
          Jesse Yates added a comment - HRegionServer.openRegion isn't called from any tests (and in particular testHBaseFsck() doesn't mess with the table directly. Marking as 'fixed'
          Jonathan Hsieh made changes -
          Field Original Value New Value
          Link This issue is related to HBASE-4842 [ HBASE-4842 ]
          Jonathan Hsieh created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Jonathan Hsieh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development