Skip to content

TSDB: GET _cat/segments failed in time_series index #89609

@weizijun

Description

@weizijun

Elasticsearch Version

master

Installed Plugins

No response

Java Version

bundled

OS Version

all

Problem Description

GET _cat/segments/test_ts?v failed in the time_series index.

Steps to Reproduce

  1. create a more than 2 nodes cluster.
  2. create a time_series like:
PUT test_ts
{
    "settings": {
      "index.mode": "time_series",
      "index.routing_path": "metricset"
    },
    "mappings": {
      "properties": {
        "metricset": {
          "type": "keyword",
          "time_series_dimension": true
        },
        "k8s": {
          "properties": {
            "pod": {
              "properties": {
                "uid": {
                  "type": "keyword",
                  "time_series_dimension": true
                }
              }
            }
          }
        }
      }
    }
  }
  1. put some data:
POST test_ts/_doc?refresh
{
  "metricset" : "a",
  "@timestamp" : 10
}
  1. exec GET _cat/segments/test_ts?v (to make sure the execute node is not the same with node of the index test_ts)
    It will cause timeout, and the node will log this:
[2022-08-25T11:17:52,569][WARN ][o.e.t.OutboundHandler    ] [node-2] failed to serialize outbound message [Response{620}{false}{false}{false}{class org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$NodeResponse}]java.io.IOException: invalid index sort field:<string: "_tsid"> missingValue=SortField.STRING_LAST
	at org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.index.engine.Segment.lambda$writeSegmentSort$0(Segment.java:241)
	at org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.common.io.stream.StreamOutput.writeArray(StreamOutput.java:916)
	at org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.index.engine.Segment.writeSegmentSort(Segment.java:222)
	at org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.index.engine.Segment.writeTo(Segment.java:167)
	at org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.common.io.stream.StreamOutput.lambda$writeCollection$34(StreamOutput.java:1141)

Logs (if relevant)

No response

Metadata

Metadata

Assignees

Labels

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