-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
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