Skip to content

Downsampling fails to handle indices with mappings that have dotted fields with subobjects false. #138572

@gmarouli

Description

@gmarouli

Elasticsearch Version

main

Installed Plugins

No response

Java Version

bundled

OS Version

n/a

Problem Description

Downsampling fails to downsample indices that have metrics with dotted fields and subobjects disabled, for example:

     "metrics.k8s.volume.inodes": {
        "type": "long",
        "time_series_metric": "gauge"
      },
      "metrics.k8s.volume.inodes.free": {
        "type": "long",
        "time_series_metric": "gauge"
      },
      "metrics.k8s.volume.inodes.used": {
        "type": "long",
        "time_series_metric": "gauge"
      }

It fails with: "Failed to parse mapping: can't merge a non object mapping [metrics.k8s.volume.inodes] with an object mapping"

Steps to Reproduce

PUT my-index
{
  "settings": {
    "number_of_shards": 1,
    "index.mode": "time_series",
    "index.routing_path": [
      "metricset"
    ],
    "index.time_series.start_time": "2021-04-28T00:00:00Z",
    "index.time_series.end_time": "2021-04-29T00:00:00Z"
  },
  "mappings": {
    "properties": {
      "@timestamp": {
        "type": "date"
      },
      "metricset": {
        "type": "keyword",
        "time_series_dimension": true
      },
      "metrics": {
        "type": "passthrough",
        "priority": 10,
        "dynamic": "true",
        "properties": {
          "k8s.volume.inodes": {
            "type": "long",
            "time_series_metric": "gauge"
          },
          "k8s.volume.inodes.free": {
            "type": "long",
            "time_series_metric": "gauge"
          },
          "k8s.volume.inodes.used": {
            "type": "long",
            "time_series_metric": "gauge"
          }
        }
      }
    }
  }
}

### Make read-only
PUT /my-index/_settings
{
  "index.blocks.write": true
}

### Downsample
POST /my-index/_downsample/will-fail
Content-Type: application/json

{
  "fixed_interval": "1h"
}

Logs (if relevant)

No response

Metadata

Metadata

Assignees

Labels

:StorageEngine/DownsamplingDownsampling (replacement for rollups) - Turn fine-grained time-based data into coarser-grained data>bugTeam:StorageEngine

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions