Process Part does not work across multiple shards

XMLWordPrintable

    • Type: Bug Report
    • Resolution: Fixed
    • Priority: L3 - Default
    • 3.1.0
    • Affects Version/s: None
    • Component/s: backend
    • None
    • Not defined

      Context:
      With OPT-3613, we enabled the process parts feature to work with huge data sets and perform the calculation for more than 10 data points. However, it seems that if the data is distributed on several shards we get the following error:

      [2020-06-25T07:56:48.185Z] 	Suppressed: org.elasticsearch.client.ResponseException: method [POST], host [http://localhost:9200], URI [/optimize-process-instance/_search?typed_keys=true&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&search_type=query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true], status line [HTTP/1.1 503 Service Unavailable]
      [2020-06-25T07:56:48.185Z] {"error":{"root_cause":[],"type":"search_phase_execution_exception","reason":"","phase":"fetch","grouped":true,"failed_shards":[],"caused_by":{"type":"script_exception","reason":"runtime error","script_stack":["aggregationType = states.get(0).aggregationType;","                               ^---- HERE"],"script":"if (states == null || states.isEmpty()) {return null;}double sum = 0; long count = 0; double min = Double.MAX_VALUE;double max = Double.MIN_VALUE;for (a in states) { if (a != null) {sum += a.get('sum');count += a.get('count');min = a.get('min') < min? a.get('min') : min;max = a.get('max') > max? a.get('max') : max;}}if (count == 0) {return null;}def aggregationType = states.get(0).aggregationType;if (aggregationType == 'avg') {return sum / count;} else if (aggregationType == 'min') {return min;} else if (aggregationType == 'max') {return max;} else if (aggregationType == 'sum') {return sum;} else {Debug.explain('Aggregation type ' + aggregationType + 'is not supported!');}","lang":"painless","caused_by":{"type":"null_pointer_exception","reason":null}}},"status":503}
      [2020-06-25T07:56:48.185Z] 		at org.elasticsearch.client.RestClient.convertResponse(RestClient.java:260)
      [2020-06-25T07:56:48.185Z] 		at org.elasticsearch.client.RestClient.performRequest(RestClient.java:238)
      [2020-06-25T07:56:48.185Z] 		at org.elasticsearch.client.RestClient.performRequest(RestClient.java:212)
      [2020-06-25T07:56:48.185Z] 		at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1433)
      [2020-06-25T07:56:48.185Z] 		... 81 common frames omitted
      

      AT:

      • the process parts feature works for data distributions on multiple shards as well

            Assignee:
            Unassigned
            Reporter:
            Johannes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: