Skip to content

Persist DataStreams as separate documents in Lucene cluster state #88888

@original-brownbear

Description

@original-brownbear

The datastreams in org.elasticsearch.cluster.metadata.DataStreamMetadata should be persisted to the Lucene CS as individual documents instead of as part of the global metadata document.
DS metadata stores all indices in the DS as a list and in many real-world applications the result is storing a list of all indices and their uuids in the global cluster state.
For larger clusters with many indices as part of DS, the time to persist the state is eventually completely dominated by the time it takes to write the DS metadata Custom to Lucene. This slows down all operations updating metadata, for example snapshot finalization or the metadata updates triggered by allocation.
Storing each DS individually would remove most of this cost from all operations that do not involve a DS metadata change.

relates #77466

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions