Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-1885

ElasticSearchSchemaManager fails if index already exists

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 2.4.0-alpha1, 2.4.0
    • None
    • backend
    • 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)
      
      

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              sebastian.bathke Sebastian Bathke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: