From 1e250328f571e7e29f2afb82a00a45ec09c6f19b Mon Sep 17 00:00:00 2001 From: David Roberts Date: Tue, 24 Sep 2019 17:27:29 +0100 Subject: [PATCH] Adjusting the location of the _cat/indices debug Relates #45652 The most recent failure suggests the exception is thrown earlier than previously assumed. --- .../rest/action/cat/RestIndicesAction.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java b/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java index 24050479be25f..0f652d9ff12d6 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java @@ -126,6 +126,11 @@ public void onResponse(final GetSettingsResponse getSettingsResponse) { @Override public void onFailure(final Exception e) { + // Temporary logging to help debug https://github.com/elastic/elasticsearch/issues/45652 + // TODO: remove this when we understand why _cat/indices sometimes returns a 404 + if (e instanceof IndexNotFoundException) { + logger.debug("_cat/indices returning index_not_found_exception", e); + } listener.onFailure(e); } }); @@ -227,11 +232,6 @@ public void onResponse(final Collection responses) { @Override public void onFailure(final Exception e) { - // Temporary logging to help debug https://github.com/elastic/elasticsearch/issues/45652 - // TODO: remove this when we understand why _cat/indices sometimes returns a 404 - if (e instanceof IndexNotFoundException) { - logger.debug("_cat/indices returning index_not_found_exception", e); - } listener.onFailure(e); } }, size);