Skip to content

Commit

Permalink
Re-load on index state change
Browse files Browse the repository at this point in the history
  • Loading branch information
n1v0lg committed Nov 2, 2023
1 parent cc4d194 commit 523ada6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,16 @@ private static void reportStats(ActionListener<Map<String, Object>> listener, Li
}

public void onSecurityIndexStateChange(SecurityIndexManager.State previousState, SecurityIndexManager.State currentState) {
// TODO figure out correct cache behavior here -- does anything need to happen?
if (isMoveFromRedToNonRed(previousState, currentState)
|| isIndexDeleted(previousState, currentState)
|| Objects.equals(previousState.indexUUID, currentState.indexUUID) == false
|| previousState.isIndexUpToDate != currentState.isIndexUpToDate) {
refreshRealms(ActionListener.noop(), null);
// TODO is this what we want?
if (cache != null) {
// re-load cache, yikes...
getMappings(ActionListener.noop());
}
}
}

Expand Down

0 comments on commit 523ada6

Please sign in to comment.