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

Clean up peer metrics when disabling peer

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

        Supposed that we have an peer with id 1,  when execute shell cmd disable_peer  '1'  and enable_peer '1', then i can see the SizeOfLogQueue metric of all regionservers   +1 ,  after 10 times disable_peer ops  , it will increase to 11, and  it will never decrease to 1 in fulture .

        I can see the function ReplicationSourceManager.refreshSources(peerId) is called , it will terminate the previous replication source and create a new one.  and found the note  //Do not clear metrics in the bellow code block:

      ReplicationSourceInterface toRemove = this.sources.put(peerId, src);
      if (toRemove != null) {
        LOG.info("Terminate replication source for " + toRemove.getPeerId());
        // Do not clear metrics
        toRemove.terminate(terminateMessage, null, false);
      }
      

       this cause the wrong number of sizeOfLogQueue, i think it's a sub issue of (HBASE-23231)

      Attachments

        Issue Links

          Activity

            People

              mosmeh Yuta Imazu
              zl_cn_hbase leizhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: