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

Default definition import limit can cause a search clause limit error during import

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Done
    • Icon: L3 - Default L3 - Default
    • 3.6.0-alpha1, 3.6.0
    • None
    • backend
    • None
    • Not defined

      Problem:
      The Definition import may get stuck on hitting the `indices.query.bool.max_clause_count` default limit of 1024. This is due to the default page size for the definition import being 10_000. Causing the deleted definition handling to create a query with one clause for each definition present in one batch, easily exceeding the 1024 clause limit.

      Steps to reproduce:
      1. deploy more than 1024 definitions to a single engine
      2. Start Optimize on an elasticsearch cluster with no previously imported data

      Actual result :
      3. The definition import fails with:

      07:14:27.891 [ThreadPoolTaskScheduler-1] ERROR o.c.o.s.i.e.m.ProcessDefinitionEngineImportMediator - Was not able to import next page and reached max backoff, aborting this run.
      org.camunda.optimize.service.exceptions.OptimizeRuntimeException: Error while trying to read Elasticsearch task (ID: utyutyutyutyutyutyu) progress!
      	at org.camunda.optimize.service.es.writer.ElasticsearchWriterUtil.waitUntilTaskIsFinished(ElasticsearchWriterUtil.java:365)
      	at org.camunda.optimize.service.es.writer.ElasticsearchWriterUtil.tryUpdateByQueryRequest(ElasticsearchWriterUtil.java:210)
      	at org.camunda.optimize.service.es.writer.ProcessDefinitionWriter.markRedeployedDefinitionsAsDeleted(ProcessDefinitionWriter.java:83)
      	at org.camunda.optimize.service.importing.engine.service.definition.ProcessDefinitionImportService.markSavedDefinitionsAsDeleted(ProcessDefinitionImportService.java:52)
      	at org.camunda.optimize.service.importing.engine.service.definition.ProcessDefinitionImportService.executeImport(ProcessDefinitionImportService.java:44)
      	at org.camunda.optimize.service.importing.TimestampBasedImportMediator.importNextEnginePageTimestampBased(TimestampBasedImportMediator.java:46)
      	at org.camunda.optimize.service.importing.TimestampBasedImportMediator.importNextPage(TimestampBasedImportMediator.java:27)
      	at org.camunda.optimize.service.importing.BackoffImportMediator.importNextPageRetryOnError(BackoffImportMediator.java:78)
      	at org.camunda.optimize.service.importing.BackoffImportMediator.runImport(BackoffImportMediator.java:27)
      	at org.camunda.optimize.service.importing.engine.EngineImportScheduler.lambda$executeImportRound$2(EngineImportScheduler.java:114)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:546)
      	at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
      	at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:505)
      	at org.camunda.optimize.service.importing.engine.EngineImportScheduler.executeImportRound(EngineImportScheduler.java:120)
      	at org.camunda.optimize.service.importing.engine.EngineImportScheduler.runImportRound(EngineImportScheduler.java:96)
      	at org.camunda.optimize.service.importing.engine.EngineImportScheduler.runImportRound(EngineImportScheduler.java:76)
      	at org.camunda.optimize.service.importing.engine.EngineImportScheduler.run(EngineImportScheduler.java:38)
      	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
      	at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.camunda.optimize.service.exceptions.OptimizeRuntimeException: Error{type='search_phase_execution_exception', reason='all shards failed', phase='query'}
      	at org.camunda.optimize.service.es.writer.ElasticsearchWriterUtil.validateTaskResponse(ElasticsearchWriterUtil.java:386)
      	at org.camunda.optimize.service.es.writer.ElasticsearchWriterUtil.waitUntilTaskIsFinished(ElasticsearchWriterUtil.java:339)
      	... 29 common frames omitted
      

      Expected result:
      No error and import eventually completing to process the history

        This is the controller panel for Smart Panels app

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

                Created:
                Updated:
                Resolved: