|
@@ -245,7 +245,8 @@ public abstract class ZKFailoverController implements Tool {
|
|
|
private synchronized void becomeActive() {
|
|
|
LOG.info("Trying to make " + localTarget + " active...");
|
|
|
try {
|
|
|
- localTarget.getProxy().transitionToActive();
|
|
|
+ HAServiceProtocolHelper.transitionToActive(localTarget.getProxy(
|
|
|
+ conf, FailoverController.getRpcTimeoutToNewActive(conf)));
|
|
|
LOG.info("Successfully transitioned " + localTarget +
|
|
|
" to active state");
|
|
|
} catch (Throwable t) {
|
|
@@ -267,7 +268,8 @@ public abstract class ZKFailoverController implements Tool {
|
|
|
LOG.info("ZK Election indicated that " + localTarget +
|
|
|
" should become standby");
|
|
|
try {
|
|
|
- localTarget.getProxy().transitionToStandby();
|
|
|
+ int timeout = FailoverController.getGracefulFenceTimeout(conf);
|
|
|
+ localTarget.getProxy(conf, timeout).transitionToStandby();
|
|
|
LOG.info("Successfully transitioned " + localTarget +
|
|
|
" to standby state");
|
|
|
} catch (Exception e) {
|