Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • None
    • 2.0.0-beta-1, 2.0.0
    • Region Assignment
    • None

    Description

      Working with replicas and the parent test in particular, I learned a few interesting things:

      1. It is hard to test if we retain assignments because our little minicluster gives RegionServers new ports on restart foiling our means of recognizing new instance of a server by checking hostname+port (and ensuring the startcode is larger).
      2. Some of our tests like the parent test depended on retaining assignment across restarts.
      3. As said in parent issue, master used to be last to go down when we did a controlled cluster shutdown. We lost that when we moved to AMv2.
      4. When we do a cluster shutdown, the RegionServers close down the Regions, not the Master as is usual in AMv2 (Master wants to do all assign ops in AMv2). This means that the Master is surprised when it gets notification of CLOSE ops that it did not initiate. Usually on CLOSE, Master updates meta with the CLOSE state. On cluster shutdown we are not doing this.
      5. So, on restart, we read meta and we see all regions still in OPEN state so we think the cluster crashed down so we go and do ServerCrashProcedure. Which hoses our ability to retain assign.

      Some experiments:

      1. I can make the Master stay up so it is last to go down
      2. This makes it so we no longer spew the logs with failed transition messages because Master is not up to receive the CLOSE transitions.
      3. I hacked in means of telling minicluster ports it should use on start; helps fake case of new RS instances
      4. It is hard to tell the difference between a clean shutdown and a crash down. It is dangerous if we get the call wrong. Currently, given that we just let ServerCrashProcedure deal with it – the safest option – one experiment is that when it goes to assign the regions that were on the crashed server, rather than round robin, instead we should look and see if new instance of old location and if so, just give it al lthe regions. That'd retain locality. This seems to work. Problem is that SCP is doing assignment. Ideally balancer would do it.

      Let me put up a patch that retains assignment across restart (somehow).

      Attachments

        1. HBASE-19501.patch
          25 kB
          Michael Stack
        2. HBASE-19501.master.001.patch
          63 kB
          Michael Stack
        3. HBASE-19501.master.002.patch
          73 kB
          Michael Stack
        4. HBASE-19501.master.003.patch
          73 kB
          Michael Stack

        Issue Links

          Activity

            People

              stack Michael Stack
              stack Michael Stack
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: