From c59db2dd400d3ecaafd165b90249629e7c3a05b4 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Tue, 22 Mar 2022 13:46:14 -0500 Subject: [PATCH 1/2] Return empty version instead of blowing up if we cannot find it --- .../java/org/elasticsearch/indices/SystemIndexManager.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/indices/SystemIndexManager.java b/server/src/main/java/org/elasticsearch/indices/SystemIndexManager.java index da204a8619017..b3349c5872ef0 100644 --- a/server/src/main/java/org/elasticsearch/indices/SystemIndexManager.java +++ b/server/src/main/java/org/elasticsearch/indices/SystemIndexManager.java @@ -310,12 +310,9 @@ private Version readMappingVersion(SystemIndexDescriptor descriptor, MappingMeta return Version.V_EMPTY; } return Version.fromString(versionString); - } catch (ElasticsearchParseException e) { + } catch (ElasticsearchParseException | IllegalArgumentException e) { logger.error(new ParameterizedMessage("Cannot parse the mapping for index [{}]", indexName), e); - throw new ElasticsearchException("Cannot parse the mapping for index [{}]", e, indexName); - } catch (IllegalArgumentException e) { - logger.error(new ParameterizedMessage("Cannot parse the mapping for index [{}]", indexName), e); - throw e; + return Version.V_EMPTY; } } From 9012dee60048e36b565f53ef7e3431ff36874494 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Tue, 22 Mar 2022 13:54:31 -0500 Subject: [PATCH 2/2] Update docs/changelog/85244.yaml --- docs/changelog/85244.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/changelog/85244.yaml diff --git a/docs/changelog/85244.yaml b/docs/changelog/85244.yaml new file mode 100644 index 0000000000000..442148fed7f6c --- /dev/null +++ b/docs/changelog/85244.yaml @@ -0,0 +1,5 @@ +pr: 85244 +summary: Return empty version instead of blowing up if we cannot find it +area: Infra/Core +type: bug +issues: []