Skip to content

Commit

Permalink
Test fix: handling engine closed when refreshing FieldInfos (elastic#…
Browse files Browse the repository at this point in the history
  • Loading branch information
piergm authored Feb 13, 2024
1 parent e6e14d7 commit 0951b32
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4014,6 +4014,8 @@ public void afterRefresh(boolean didRefresh) {
if (enableFieldHasValue) {
try (Engine.Searcher hasValueSearcher = getEngine().acquireSearcher("field_has_value")) {
setFieldInfos(FieldInfos.getMergedFieldInfos(hasValueSearcher.getIndexReader()));
} catch (AlreadyClosedException ignore) {
// engine is closed - no updated FieldInfos is fine
}
}
}
Expand Down

0 comments on commit 0951b32

Please sign in to comment.