Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-15867 Move HBase replication tracking from ZooKeeper to HBase
  3. HBASE-16036

Fix ReplicationTableBase initialization to make it non-blocking

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • Replication
    • None
    • Reviewed

    Description

      Currently there is a bug inside of TableBasedReplicationQueuesImpl construction that prevents ReplicationServices from starting before Master is initialized. So currently each of the RS, including HMaster, with Replication enabled will attempt to create the ReplicationTable on initialization.
      Currently HMaster's initialization: serviceThreads.start() -> new TableBasedReplicationQueuesImpl() -> Replication Table Creation -> HMaster sets initialized flags.
      But this fails when we try to create the Replication Table as the HMaster.checkInitialized() flag fails. This ends up blocking HMaster initialization and results in a deadlock.
      So in this patch, I will create the Replication Table in the background of TableBasedReplicationQueuesImpl and only block when we actually call methods that access it.
      This also requires a small refactoring of ReplicationSourceManager.init() so that we run the abandoned queue adoption in the background

      Review board at: https://reviews.apache.org/r/48763/

      Attachments

        1. HBASE-16036.patch
          54 kB
          Joseph

        Activity

          People

            Vegetable26 Joseph
            Vegetable26 Joseph
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: