-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
Given:
some indexes are present from previous version, but a new index is not yet created
When:
ElasticSearchSchemaManager executes createOptimizeIndices if a single index is missing
Then:
ElasticSearchSchemaManager.createOptimizeIndices fails with indexAlreadyExists error
Expected:
indexAlreadyExists errors are ignored like with versions <=2.4.0, missing indexes created
Notes:
Caused by: [optimize-collection_v1/X5kzYxz1Rr6YY-WgeXPsjQ] ElasticsearchStatusException[Elasticsearch exception [type=resource_already_exists_exception, reason=index [optimize-collection_v1/X5kzYxz1Rr6YY-WgeXPsjQ] already exists]] at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:177) at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:1793) at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:1769) at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1606) at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1563) at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1525) at org.elasticsearch.client.IndicesClient.create(IndicesClient.java:146) at org.camunda.optimize.service.es.schema.ElasticSearchSchemaManager.createOptimizeIndices(ElasticSearchSchemaManager.java:117) ... 58 more Caused by: org.elasticsearch.client.ResponseException: method [PUT], host [http://localhost:9200], URI [/optimize-collection_v1?master_timeout=30s&timeout=30s], status line [HTTP/1.1 400 Bad Request] {"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [optimize-collection_v1/X5kzYxz1Rr6YY-WgeXPsjQ] already exists","index_uuid":"X5kzYxz1Rr6YY-WgeXPsjQ","index":"optimize-collection_v1"}],"type":"resource_already_exists_exception","reason":"index [optimize-collection_v1/X5kzYxz1Rr6YY-WgeXPsjQ] already exists","index_uuid":"X5kzYxz1Rr6YY-WgeXPsjQ","index":"optimize-collection_v1"},"status":400} at org.elasticsearch.client.RestClient$1.completed(RestClient.java:546) at org.elasticsearch.client.RestClient$1.completed(RestClient.java:531)