HBASE-3664 [replication] Adding a slave when there's none may kill the cluster
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1082752 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5997bc3ca5
commit
95661df251
|
@ -145,6 +145,7 @@ Release 0.90.2 - Unreleased
|
|||
HBASE-3650 HBA.delete can return too fast
|
||||
HBASE-3659 Fix TestHLog to pass on newer versions of Hadoop
|
||||
HBASE-3595 get_counter broken in shell
|
||||
HBASE-3664 [replication] Adding a slave when there's none may kill the cluster
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-3542 MultiGet methods in Thrift
|
||||
|
|
|
@ -228,12 +228,16 @@ public class ReplicationSourceManager {
|
|||
LOG.warn("Replication stopped, won't add new log");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.sources.size() > 0) {
|
||||
this.zkHelper.addLogToList(newLog.getName(),
|
||||
this.sources.get(0).getPeerClusterZnode());
|
||||
}
|
||||
|
||||
synchronized (this.hlogs) {
|
||||
if (this.sources.size() > 0) {
|
||||
this.zkHelper.addLogToList(newLog.getName(),
|
||||
this.sources.get(0).getPeerClusterZnode());
|
||||
} else {
|
||||
// If there's no slaves, don't need to keep the old hlogs since
|
||||
// we only consider the last one when a new slave comes in
|
||||
this.hlogs.clear();
|
||||
}
|
||||
this.hlogs.add(newLog.getName());
|
||||
}
|
||||
this.latestPath = newLog;
|
||||
|
|
Loading…
Reference in New Issue