Fix NPE on Stale Index in IndicesService(#39173)
This is a backport of #38891 which closes #38845
This commit is contained in:
parent
09ea3ccd16
commit
c783069804
|
@ -900,6 +900,9 @@ public class IndicesService extends AbstractLifecycleComponent
|
|||
final IndexMetaData metaData;
|
||||
try {
|
||||
metaData = metaStateService.loadIndexState(index);
|
||||
if (metaData == null) {
|
||||
return null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.warn(() -> new ParameterizedMessage("[{}] failed to load state file from a stale deleted index, " +
|
||||
"folders will be left on disk", index), e);
|
||||
|
|
Loading…
Reference in New Issue