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

NPE in MigrateReplicationQueueFromZkToTableProcedure recovery

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.0.0-alpha-4
    • 3.0.0-beta-1
    • Replication
    • None
    • Reviewed

    Description

      MigrateReplicationQueueFromZkToTableProcedure will restore the disabled state of replication log cleaner barrier when replayed in master recovery,

      @Override
      protected void afterReplay(MasterProcedureEnv env) {
        if (getCurrentState() == getInitialState()) {
          // do not need to disable log cleaner or acquire lock if we are in the initial state, later
          // when executing the procedure we will try to disable and acquire.
          return;
        }
        if (!env.getReplicationPeerManager().getReplicationLogCleanerBarrier().disable()) {
          throw new IllegalStateException("can not disable log cleaner, this should not happen");
        }
      } 

      however the replicationPeerManager has not been initialized when replay procedure, which will cause a nullPointerException and master to abort.

      Maybe better to add a check after the initialization of replicationPeerManager to determine whether replication log cleaner barrier needs to be disabled ?

      Attachments

        Issue Links

          Activity

            People

              zhangduo Duo Zhang
              frostruan ruanhui
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: