mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
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 {
|
||||
nodeIndexCreatedAction.nodeIndexCreated(index, event.state().nodes().localNodeId());
|
||||
} 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()) {
|
||||
try {
|
||||
nodeIndexDeletedAction.nodeIndexDeleted(index, event.state().nodes().localNodeId());
|
||||
} 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) {
|
||||
//handles open/close index notifications
|
||||
if (event.indicesStateChanged()) {
|
||||
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…
x
Reference in New Issue
Block a user