use of org.apache.ignite.internal.processors.cache.DynamicCacheChangeFailureMessage in project ignite by apache.
the class GridDhtPartitionsExchangeFuture method sendExchangeFailureMessage.
/**
* Sends {@link DynamicCacheChangeFailureMessage} to all participated nodes that represents a cause of exchange
* failure.
*/
private void sendExchangeFailureMessage() {
assert crd != null && crd.isLocal();
try {
IgniteCheckedException err = createExchangeException(exchangeGlobalExceptions);
List<String> cacheNames = new ArrayList<>(exchActions.cacheStartRequests().size());
for (ExchangeActions.CacheActionData actionData : exchActions.cacheStartRequests()) cacheNames.add(actionData.request().cacheName());
DynamicCacheChangeFailureMessage msg = new DynamicCacheChangeFailureMessage(cctx.localNode(), exchId, err, cacheNames);
if (log.isDebugEnabled())
log.debug("Dynamic cache change failed (send message to all participating nodes): " + msg);
cacheChangeFailureMsgSent = true;
cctx.discovery().sendCustomEvent(msg);
return;
} catch (IgniteCheckedException e) {
if (reconnectOnError(e))
onDone(new IgniteNeedReconnectException(cctx.localNode(), e));
else
onDone(e);
}
}
Aggregations