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-3650 HBA.delete can return too fast
|
||||||
HBASE-3659 Fix TestHLog to pass on newer versions of Hadoop
|
HBASE-3659 Fix TestHLog to pass on newer versions of Hadoop
|
||||||
HBASE-3595 get_counter broken in shell
|
HBASE-3595 get_counter broken in shell
|
||||||
|
HBASE-3664 [replication] Adding a slave when there's none may kill the cluster
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-3542 MultiGet methods in Thrift
|
HBASE-3542 MultiGet methods in Thrift
|
||||||
|
|
|
@ -229,11 +229,15 @@ public class ReplicationSourceManager {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
synchronized (this.hlogs) {
|
||||||
if (this.sources.size() > 0) {
|
if (this.sources.size() > 0) {
|
||||||
this.zkHelper.addLogToList(newLog.getName(),
|
this.zkHelper.addLogToList(newLog.getName(),
|
||||||
this.sources.get(0).getPeerClusterZnode());
|
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();
|
||||||
}
|
}
|
||||||
synchronized (this.hlogs) {
|
|
||||||
this.hlogs.add(newLog.getName());
|
this.hlogs.add(newLog.getName());
|
||||||
}
|
}
|
||||||
this.latestPath = newLog;
|
this.latestPath = newLog;
|
||||||
|
|
Loading…
Reference in New Issue