HBASE-9468 Previous active master can still serves RPC request when it is trying recovering expired zk session

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1521949 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-09-11 17:43:43 +00:00
parent 6bcccde06a
commit e150672901
2 changed files with 10 additions and 1 deletions

View File

@ -146,6 +146,12 @@ possible configurations would overwhelm and obscure the important.
<description>Timeout value for the Catalog Janitor from the master to <description>Timeout value for the Catalog Janitor from the master to
META.</description> META.</description>
</property> </property>
<property>
<name>fail.fast.expired.active.master</name>
<value>false</value>
<description>If abort immediately for the expired master without trying
to recover its zk session.</description>
</property>
<property> <property>
<name>hbase.master.dns.interface</name> <name>hbase.master.dns.interface</name>
<value>default</value> <value>default</value>

View File

@ -2347,7 +2347,10 @@ MasterServices, Server {
if (!this.isActiveMaster || this.stopped) { if (!this.isActiveMaster || this.stopped) {
return true; return true;
} }
if (t != null && t instanceof KeeperException.SessionExpiredException) {
boolean failFast = conf.getBoolean("fail.fast.expired.active.master", false);
if (t != null && t instanceof KeeperException.SessionExpiredException
&& !failFast) {
try { try {
LOG.info("Primary Master trying to recover from ZooKeeper session " + LOG.info("Primary Master trying to recover from ZooKeeper session " +
"expiry."); "expiry.");