OpenSearch/plugins
Yannick Welsch 35f78d098a Separate publishing from applying cluster states (#24236)
Separates cluster state publishing from applying cluster states:

- ClusterService is split into two classes MasterService and ClusterApplierService. MasterService has the responsibility to calculate cluster state updates for actions that want to change the cluster state (create index, update shard routing table, etc.). ClusterApplierService has the responsibility to apply cluster states that have been successfully published and invokes the cluster state appliers and listeners.
- ClusterApplierService keeps track of the last applied state, but MasterService is stateless and uses the last cluster state that is provided by the discovery module to calculate the next prospective state. The ClusterService class is still kept around, which now just delegates actions to ClusterApplierService and MasterService.
- The discovery implementation is now responsible for managing the last cluster state that is used by the consensus layer and the master service. It also exposes the initial cluster state which is used by the ClusterApplierService. The discovery implementation is also responsible for adding the right cluster-level blocks to the initial state.
- NoneDiscovery has been renamed to TribeDiscovery as it is exclusively used by TribeService. It adds the tribe blocks to the initial state.
- ZenDiscovery is synchronized on state changes to the last cluster state that is used by the consensus layer and the master service, and does not submit cluster state update tasks anymore to make changes to the disco state (except when becoming master).

Control flow for cluster state updates is now as follows:

- State updates are sent to MasterService
- MasterService gets the latest committed cluster state from the discovery implementation and calculates the next cluster state to publish
- MasterService submits the new prospective cluster state to the discovery implementation for publishing
- Discovery implementation publishes cluster states to all nodes and, once the state is committed, asks the ClusterApplierService to apply the newly committed state.
- ClusterApplierService applies state to local node.
2017-04-28 09:34:31 +02:00
..
analysis-icu Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
analysis-kuromoji Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
analysis-phonetic Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
analysis-smartcn Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
analysis-stempel Start building analysis-common module (#23614) 2017-04-19 18:51:34 -04:00
analysis-ukrainian Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
discovery-azure-classic Separate publishing from applying cluster states (#24236) 2017-04-28 09:34:31 +02:00
discovery-ec2 Separate publishing from applying cluster states (#24236) 2017-04-28 09:34:31 +02:00
discovery-file Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
discovery-gce Separate publishing from applying cluster states (#24236) 2017-04-28 09:34:31 +02:00
ingest-attachment Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
ingest-geoip Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
ingest-user-agent Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
jvm-example Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
mapper-murmur3 Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
mapper-size Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
repository-azure Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
repository-gcs Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
repository-hdfs Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
repository-s3 S3 Repository: Deprecate remaining `repositories.s3.*` settings (#24144) 2017-04-25 23:43:20 -07:00
store-smb Tests: Clean up rest test file handling (#21392) 2017-04-18 15:07:08 -07:00
build.gradle Plugins: Include license and notice files in zip (#23191) 2017-02-15 11:23:12 -08:00