Skip to content

Better extension point for custom cluster state parts #20888

@martijnvg

Description

@martijnvg

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions