We currently support index level custom metadata that can be attached to indices, and we use ourselves for warmers. The IndexMetadata.Custom interface has a merge method that allows to merging two custom index metadatas. This is used, for instance, when applying index templates at index creation, since the create index request and index templates can both contain custom metadata which need to be merged to obtain the metadata for the new index.
We also support cluster level custom metadata to the cluster state (ClusterState.Custom), but no merging is supported there. This would be useful for instance on the tribe node, where we merge the cluster states from the different tribes to create a single cluster state view on top of them.
We should introduce a merge function on the ClusterState.Custom.Factory that will determine if/how the custom metadata should be merged on tribe.
For extensibility sake, we should consider adding this merge function on any Custom construct that we have (we also have MetaData.Custom)
We currently support index level custom metadata that can be attached to indices, and we use ourselves for warmers. The
IndexMetadata.Custominterface has amergemethod that allows to merging two custom index metadatas. This is used, for instance, when applying index templates at index creation, since the create index request and index templates can both contain custom metadata which need to be merged to obtain the metadata for the new index.We also support cluster level custom metadata to the cluster state (
ClusterState.Custom), but no merging is supported there. This would be useful for instance on the tribe node, where we merge the cluster states from the different tribes to create a single cluster state view on top of them.We should introduce a
mergefunction on theClusterState.Custom.Factorythat will determine if/how the custom metadata should be merged on tribe.For extensibility sake, we should consider adding this
mergefunction on anyCustomconstruct that we have (we also haveMetaData.Custom)