Fix GridClusterStateProcessor#changeGlobalState0() should wrap future before sending ChangeGlobalStateMessage - Fixes
@@ -904,15 +904,19 @@ public class GridClusterStateProcessor extends GridProcessorAdapter implements I
forceChangeBaselineTopology,
System.currentTimeMillis());
+ IgniteInternalFuture<?> resFut = wrapStateChangeFuture(startedFut, msg);
+
try {
if (log.isInfoEnabled())
U.log(log, "Sending " + prettyStr(activate) + " request with BaselineTopology " + blt);
ctx.discovery().sendCustomEvent(msg);
- if (ctx.isStopping())
- startedFut.onDone(new IgniteCheckedException("Failed to execute " + prettyStr(activate) + " request, " +
- "node is stopping."));
+ if (ctx.isStopping()) {
+ String errMsg = "Failed to execute " + prettyStr(activate) + " request, node is stopping.";
+
+ startedFut.onDone(new IgniteCheckedException(errMsg));
+ }
}
catch (IgniteCheckedException e) {
U.error(log, "Failed to send global state change request: " + activate, e);
@@ -920,7 +924,7 @@ public class GridClusterStateProcessor extends GridProcessorAdapter implements I
startedFut.onDone(e);
}
- return wrapStateChangeFuture(startedFut, msg);
+ return resFut;
}
/** {@inheritDoc} */
