Skip to content

Commit

Permalink
[Bug] Check phase name before SearchRequestOperationsListener onPhase…
Browse files Browse the repository at this point in the history
…Start

Signed-off-by: David Zane <davizane@amazon.com>
  • Loading branch information
dzane17 committed Jan 26, 2024
1 parent 9f649e0 commit 8f0e5b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,10 @@ private void onPhaseEnd(SearchRequestContext searchRequestContext) {

private void onPhaseStart(SearchPhase phase) {
setCurrentPhase(phase);
this.searchRequestContext.getSearchRequestOperationsListener().onPhaseStart(this);
try {
SearchPhaseName.valueOf(phase.getSearchPhaseName().toString());
this.searchRequestContext.getSearchRequestOperationsListener().onPhaseStart(this);
} catch (IllegalArgumentException ignored) {}
}

private void onRequestEnd(SearchRequestContext searchRequestContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ private AbstractSearchAsyncAction<? extends SearchPhaseResult> searchAsyncAction
clusters,
searchRequestContext
);
return new SearchPhase(action.getName()) {
return new SearchPhase("none") {
@Override
public void run() {
action.start();
Expand Down

0 comments on commit 8f0e5b8

Please sign in to comment.