make sure we wrap a potential failure in sending master state change in a catch
This commit is contained in:
parent
668d55758b
commit
33d8571d1e
|
@ -178,14 +178,14 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent<Indic
|
||||||
try {
|
try {
|
||||||
nodeIndexCreatedAction.nodeIndexCreated(index, event.state().nodes().localNodeId());
|
nodeIndexCreatedAction.nodeIndexCreated(index, event.state().nodes().localNodeId());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.debug("failed to send to master index {} created event", index);
|
logger.debug("failed to send to master index {} created event", e, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (String index : event.indicesDeleted()) {
|
for (String index : event.indicesDeleted()) {
|
||||||
try {
|
try {
|
||||||
nodeIndexDeletedAction.nodeIndexDeleted(index, event.state().nodes().localNodeId());
|
nodeIndexDeletedAction.nodeIndexDeleted(index, event.state().nodes().localNodeId());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.debug("failed to send to master index {} deleted event", index);
|
logger.debug("failed to send to master index {} deleted event", e, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,11 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent<Indic
|
||||||
private void notifyIndicesStateChanged(final ClusterChangedEvent event) {
|
private void notifyIndicesStateChanged(final ClusterChangedEvent event) {
|
||||||
//handles open/close index notifications
|
//handles open/close index notifications
|
||||||
if (event.indicesStateChanged()) {
|
if (event.indicesStateChanged()) {
|
||||||
nodeIndicesStateUpdatedAction.nodeIndexStateUpdated(new NodeIndicesStateUpdatedAction.NodeIndexStateUpdatedResponse(event.state().nodes().localNodeId(), event.state().version()));
|
try {
|
||||||
|
nodeIndicesStateUpdatedAction.nodeIndexStateUpdated(new NodeIndicesStateUpdatedAction.NodeIndexStateUpdatedResponse(event.state().nodes().localNodeId(), event.state().version()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.debug("failed to send to master indices state change event", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue