Class DiscoveryUpgradeService
java.lang.Object
org.elasticsearch.cluster.coordination.DiscoveryUpgradeService
Deals with rolling upgrades of the cluster coordination layer. In mixed clusters we prefer to elect the older nodes, but
when the last old node shuts down then as long as there are enough new nodes we can assume that they form the whole cluster and
define them as the initial configuration.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDiscoveryUpgradeService(Settings settings, TransportService transportService, BooleanSupplier isBootstrappedSupplier, JoinHelper joinHelper, Supplier<Iterable<DiscoveryNode>> peersSupplier, Consumer<CoordinationMetadata.VotingConfiguration> initialConfigurationConsumer)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate(Optional<DiscoveryNode> lastKnownLeader, ClusterState lastAcceptedClusterState)
static DiscoveryNode
Pre-7.0 nodes select the best master by comparing their IDs (as strings) and selecting the lowest one amongst those nodes with the best cluster state version.void
-
Field Details
-
BWC_PING_TIMEOUT_SETTING
-
ENABLE_UNSAFE_BOOTSTRAPPING_ON_UPGRADE_SETTING
-
-
Constructor Details
-
DiscoveryUpgradeService
public DiscoveryUpgradeService(Settings settings, TransportService transportService, BooleanSupplier isBootstrappedSupplier, JoinHelper joinHelper, Supplier<Iterable<DiscoveryNode>> peersSupplier, Consumer<CoordinationMetadata.VotingConfiguration> initialConfigurationConsumer)
-
-
Method Details
-
activate
public void activate(Optional<DiscoveryNode> lastKnownLeader, ClusterState lastAcceptedClusterState) -
deactivate
public void deactivate() -
createDiscoveryNodeWithImpossiblyHighId
Pre-7.0 nodes select the best master by comparing their IDs (as strings) and selecting the lowest one amongst those nodes with the best cluster state version. We want 7.0+ nodes to participate in these elections in a mixed cluster but never to win one, so we lie and claim to have an impossible ID that compares above all genuine IDs.
-