-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Today custom cluster state, metadata and index metadata can be registered via adding static codeblock that invokes ClusterState|MetaData|IndexMetaData#registerProtoType(...) in the plugin class. Apart from the fact that requiring static code blocks for extension points is far from ideal, there is no mechanism that prevents code from registering custom cluster state parts after a node has started (i'm not sure what the behaviour is when this happens).
Instead we should have a ClusterStatePlugin interface that plugins can implements that allows registering custom cluster state, metadata and or index metadata. The interface should have 3 default methods that allows to register the 3 different custom cluster state parts that exist today.
Also as far as I know there is nothing that registers custom index metadata, so I wonder if we can remove that.