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

PeerConfigTracker only supporting one listener will cause problem when there is a recovered replication queue

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.0, 1.5.0
    • 1.4.6
    • None
    • None
    • Reviewed

    Description

      
      public void init(Context context) throws IOException {
       this.ctx = context;
      
       if (this.ctx != null){
       ReplicationPeer peer = this.ctx.getReplicationPeer();
       if (peer != null){
       peer.trackPeerConfigChanges(this);
       } else {
       LOG.warn("Not tracking replication peer config changes for Peer Id " + this.ctx.getPeerId() +
       " because there's no such peer");
       }
       }
      }
      
      

      As we know, replication source will set itself to the PeerConfigTracker in ReplicationPeer. When there is one or more recovered queue, each queue will generate a new replication source, But they share the same ReplicationPeer. 

      Then when it calls setListener, the new generated one will cover the older one. Thus there will only has one ReplicationPeer that receive the peer config change notify.

      
      public synchronized void setListener(ReplicationPeerConfigListener listener){
       this.listener = listener;
      }
      
      

       

      To solve this,  PeerConfigTracker need to support multiple listener and listener should be removed when the replication endpoint terminated.

      I will upload a patch later with fix and UT.

      Attachments

        1. HBASE-20855.branch-1.001.patch
          12 kB
          Jingyun Tian
        2. HBASE-20855.branch-1.002.patch
          13 kB
          Jingyun Tian
        3. HBASE-20855.branch-1.003.patch
          13 kB
          Jingyun Tian
        4. HBASE-20855.branch-1.004.patch
          12 kB
          Jingyun Tian
        5. HBASE-20855.branch-1.005.patch
          11 kB
          Jingyun Tian
        6. HBASE-20855.branch-1.006.patch
          13 kB
          Jingyun Tian
        7. HBASE-20855.branch-1.007.patch
          13 kB
          Jingyun Tian

        Issue Links

          Activity

            People

              tianjingyun Jingyun Tian
              tianjingyun Jingyun Tian
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: