[replication] RSM won't cleanup after locking if 0 peers
--------------------------------------------------------

                 Key: HBASE-2989
                 URL: https://issues.apache.org/jira/browse/HBASE-2989
             Project: HBase
          Issue Type: Bug
            Reporter: Jean-Daniel Cryans
            Assignee: Jean-Daniel Cryans
            Priority: Minor
             Fix For: 0.90.0


Small bug in ReplicationSourceManager, it won't cleanup after locking another's 
RS znode if it didn't contain any queue at all. It happens in transferQueues():

{code}
LOG.info("Moving " + rsZnode + "'s hlogs to my queue");
    SortedMap<String, SortedSet<String>> newQueues =
        this.zkHelper.copyQueuesFromRS(rsZnode);
    if (newQueues == null || newQueues.size() == 0) {
      return;
    }
    this.zkHelper.deleteRsQueues(rsZnode);
{code}

That last line should be before the if, so that it deletes the lock znode and 
the RS znode. Currently a lot of cruft piles up in ZK after a few restarts with 
replication enabled and no queues, or in slave RSs.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to