Skip to content

Immediately upgrading a downgraded tsdb data stream fails #96163

@martijnvg

Description

@martijnvg

Immediately upgrading a data stream to tsdb after is has been downgraded from a tsdb data stream fails the execute.
This is because there already exists a tsdb backing index and the rollover doesn't detects that, because the data stream is non tsdb.

Note that after waiting ~4hrs the rollover should succeed.

Reproduction:

PUT _index_template/1
{
  "index_patterns": [
    "test*"
  ],
  "template": {
    "settings": {
      "index": {
        "mode": "time_series"
      }
    },
    "mappings": {
      "properties": {
          "my_field": {
              "time_series_dimension": true,
              "type": "keyword"
          }
      }
    }
  },
  "data_stream": {}
}

POST test1/_doc
{
  "@timestamp": "2023-05-16T11:49:50.599Z",
  "my_field": "value"
}

PUT _index_template/1
{
    "index_patterns": [
        "test*"
    ],
    "template": {
        "settings": {
            "index": {
                "mode": null
            }
        },
        "mappings": {
            "properties": {
                "my_field": {
                    "time_series_dimension": true,
                    "type": "keyword"
                }
            }
        }
    },
    "data_stream": {}
}

POST test1/_rollover

PUT _index_template/1
{
    "index_patterns": [
        "test*"
    ],
    "template": {
        "settings": {
            "index": {
                "mode": "time_series"
            }
        },
        "mappings": {
            "properties": {
                "my_field": {
                    "time_series_dimension": true,
                    "type": "keyword"
                }
            }
        }
    },
    "data_stream": {}
}

POST test1/_rollover

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Docs/DevDocs team for PDC:Search concepts (search, analytics, timeseries, ML, dev tools):StorageEngine/TSDBYou know, for Metrics>docsGeneral docs changesTeam:StorageEngine

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions