Class DiscoveryUpgradeService

java.lang.Object
org.elasticsearch.cluster.coordination.DiscoveryUpgradeService

public class DiscoveryUpgradeService extends Object
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 Details

    • BWC_PING_TIMEOUT_SETTING

      public static final Setting<org.elasticsearch.core.TimeValue> BWC_PING_TIMEOUT_SETTING
    • ENABLE_UNSAFE_BOOTSTRAPPING_ON_UPGRADE_SETTING

      public static final Setting<Boolean> ENABLE_UNSAFE_BOOTSTRAPPING_ON_UPGRADE_SETTING
  • Constructor Details

  • Method Details

    • activate

      public void activate(Optional<DiscoveryNode> lastKnownLeader, ClusterState lastAcceptedClusterState)
    • deactivate

      public void deactivate()
    • createDiscoveryNodeWithImpossiblyHighId

      public static DiscoveryNode createDiscoveryNodeWithImpossiblyHighId(DiscoveryNode node)
      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.