add more trace logging for recovery

This commit is contained in:
Shay Banon 2012-07-11 01:19:11 +02:00
parent bfb4a29700
commit 7ff4371f95
2 changed files with 4 additions and 0 deletions

View File

@ -212,6 +212,7 @@ public class GatewayService extends AbstractLifecycleComponent<GatewayService> i
@Override
public void run() {
if (recovered.compareAndSet(false, true)) {
logger.trace("performing state recovery...");
gateway.performStateRecovery(recoveryListener);
}
}
@ -219,6 +220,7 @@ public class GatewayService extends AbstractLifecycleComponent<GatewayService> i
}
} else {
if (recovered.compareAndSet(false, true)) {
logger.trace("performing state recovery...");
gateway.performStateRecovery(recoveryListener);
}
}
@ -234,6 +236,7 @@ public class GatewayService extends AbstractLifecycleComponent<GatewayService> i
@Override
public void onSuccess(final ClusterState recoveredState) {
logger.trace("successful state recovery, importing cluster state...");
clusterService.submitStateUpdateTask("local-gateway-elected-state", new ProcessedClusterStateUpdateTask() {
@Override
public ClusterState execute(ClusterState currentState) {

View File

@ -100,6 +100,7 @@ public class LocalGateway extends AbstractLifecycleComponent<Gateway> implements
public void performStateRecovery(final GatewayStateRecoveredListener listener) throws GatewayException {
Set<String> nodesIds = Sets.newHashSet();
nodesIds.addAll(clusterService.state().nodes().masterNodes().keySet());
logger.trace("performing state recovery from {}", nodesIds);
TransportNodesListGatewayMetaState.NodesLocalGatewayMetaState nodesState = listGatewayMetaState.list(nodesIds, null).actionGet();