Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Rollup indices don't work properly #74348

Closed
mbondyra opened this issue Aug 5, 2020 · 1 comment · Fixed by #75314
Closed

[Lens] Rollup indices don't work properly #74348

mbondyra opened this issue Aug 5, 2020 · 1 comment · Fixed by #75314
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@mbondyra
Copy link
Contributor

mbondyra commented Aug 5, 2020

Kibana version:
master
Elasticsearch version:
master


Before trying to reproduce any of these bugs:

  1. create a rollup index and rollup index pattern. I used this configuration:
{
  "config": {
    "id": "rollup-copy",
    "index_pattern": "kibana_sample_data_flights",
    "rollup_index": "rollup_flights",
    "cron": "0 * * * * ?",
    "groups": {
      "date_histogram": {
        "fixed_interval": "24h",
        "field": "timestamp",
        "delay": "30s",
        "time_zone": "UTC"
      },
      "histogram": {
        "interval": 100,
        "fields": [
          "AvgTicketPrice"
        ]
      },
      "terms": {
        "fields": [
          "DestCityName",
          "AvgTicketPrice",
          "DistanceMiles",
          "Dest",
          "Origin"
        ]
      }
    },
    "metrics": [
      {
        "field": "DistanceMiles",
        "metrics": [
          "avg",
          "max",
          "min",
          "sum",
          "value_count"
        ]
      }
    ],
    "timeout": "20s",
    "page_size": 1000
  },
}
  1. Open lens and switch the index pattern to rollup one.

Bug 1: number field not defined in rollup index as metrics causes editor to break

Steps to reproduce:

  1. Try to drag and drop a number field that was specified in terms in rollup index but not in metrics - in my case, "AvgTicketPrice". The editor will blow up.

Console message:

indexpattern.tsx:26 Uncaught TypeError: Cannot destructure property 'dataType' of 'column' as it is undefined.
    at columnToOperation (indexpattern.tsx:26)

Bug 2: existence endpoint fails

Existence endpoint returns 500 with a response:
{"statusCode":500,"error":"Internal Server Error","message":"[query_shard_exception] No mapping found for [timestamp] in order to sort on, with { index_uuid=\"7R8mLB91TduiLlZ7UIBclA\" & index=\"rollup_flights\" }"}

image

Bug 3: Date histogram is not displayed properly

Here's the screenshot:
image

Request sent to internal/search/es:

{"params":{"ignoreThrottled":true,"index":"rollup_flights","body":{"aggs":{"eb2e5e1f-f608-4bfd-b163-de175594bc86":{"date_histogram":{"field":"timestamp","calendar_interval":"1d","time_zone":"UTC"}}},"size":0,"stored_fields":["*"],"script_fields":{},"docvalue_fields":[{"field":"timestamp","format":"date_time"}],"_source":{"excludes":[]},"query":{"bool":{"must":[],"filter":[{"match_all":{}},{"range":{"timestamp":{"gte":"2020-08-05T09:46:59.674Z","lte":"2020-08-05T10:01:59.674Z","format":"strict_date_optional_time"}}}],"should":[],"must_not":[]}}},"rest_total_hits_as_int":true,"ignore_unavailable":true,"ignore_throttled":true,"preference":1596621113803,"timeout":"30000ms"},"indexType":"rollup"}

with a response:

{"statusCode":400,"error":"Bad Request","message":"[illegal_argument_exception] There is not a rollup job that has a [date_histogram] agg on field [timestamp] which also satisfies all requirements of query.","attributes":{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"There is not a rollup job that has a [date_histogram] agg on field [timestamp] which also satisfies all requirements of query."}],"type":"illegal_argument_exception","reason":"There is not a rollup job that has a [date_histogram] agg on field [timestamp] which also satisfies all requirements of query."}}}

Bug 4: Using number field for 'breakdown by'

Trying to break down by 'top values of number data' throws an error:
image
request:

{"statusCode":500,"error":"Internal Server Error","message":"[runtime_exception] Unable to unroll aggregation tree.  Aggregation [c733af5a-0757-435f-a7ff-bf64af765210] is of type [DoubleTerms] which is currently unsupported.","attributes":{"error":{"root_cause":[{"type":"runtime_exception","reason":"Unable to unroll aggregation tree.  Aggregation [c733af5a-0757-435f-a7ff-bf64af765210] is of type [DoubleTerms] which is currently unsupported."}],"type":"runtime_exception","reason":"Unable to unroll aggregation tree.  Aggregation [c733af5a-0757-435f-a7ff-bf64af765210] is of type [DoubleTerms] which is currently unsupported."}}}

response:

{"statusCode":500,"error":"Internal Server Error","message":"[runtime_exception] Unable to unroll aggregation tree.  Aggregation [c733af5a-0757-435f-a7ff-bf64af765210] is of type [DoubleTerms] which is currently unsupported.","attributes":{"error":{"root_cause":[{"type":"runtime_exception","reason":"Unable to unroll aggregation tree.  Aggregation [c733af5a-0757-435f-a7ff-bf64af765210] is of type [DoubleTerms] which is currently unsupported."}],"type":"runtime_exception","reason":"Unable to unroll aggregation tree.  Aggregation [c733af5a-0757-435f-a7ff-bf64af765210] is of type [DoubleTerms] which is currently unsupported."}}}
@mbondyra mbondyra added bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Aug 5, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants