Skip to main content
Version: 5.4

Cluster and member states

Cluster states determine what cluster operations are available. By changing the state of a cluster, you can grant or restrict cluster operations such as repartitioning as well as change the behavior of those operations.

You may want to change a cluster's state to do the following:

  • Add multiple new members to the cluster without triggering repartitioning after each member joins.
  • Perform maintenance on a cluster without triggering repartitioning.

Cluster states control the following operations on partitions:

TermDefinition
MigrationWhen a primary partition's ownership is transferred from one member to another. Partition ownership is decided by the cluster's master member and is followed by the physical movement of data over the network.
PromotionWhen the first replica of a partition becomes the primary. This operation requires no movement of data over the network.
Replica syncWhen the primary partition owner sends its data to replica owners for synchronization.

For more on partitions and their primary and backup replicas, see Data Partitioning and Replication.

Cluster states​

By default, all clusters are in an ACTIVE state. In this state, the cluster operates without restrictions.

All other cluster states restrict the operations on a cluster:

StateNew membersMigrationsPromotionsReplica syncUse case
ACTIVEYesYesYesYesNormal cluster operation
NO_MIGRATIONYesNoYesYesAdding multiple new members to the cluster without triggering repartitioning after each member joins.
FROZENNoNoNoYesPerforming maintenance on a cluster without triggering repartitioning.
PASSIVENoNoNoYesUsed internally during graceful cluster-wide shutdowns. In this state, Hazelcast runs read operations such as map.get() and rejects write operations such as map.put() with an IllegalStateException. Adding an index with IMap.addIndex() is an exception: Hazelcast allows it.
IN_TRANSITIONNoNoNoNoUsed internally as a temporary state while the cluster state is still changing. Repartitioning and backup operations are paused until the state is changed. If an error occurs during a state change that you request, Hazelcast does not try to change the cluster state again.

Frozen vs no migration​

The difference between the FROZEN state and the NO_MIGRATION state is in what happens when a member leaves the cluster.

In a NO_MIGRATION state, when a member leaves the cluster, the first replica of each partition owned by that member is promoted and partitions remain available.

In a FROZEN state, when a member leaves the cluster, the partitions owned by that member are unavailable until it rejoins or the cluster is put back into an ACTIVE state.

Member states​

Individual members can be in the following states:

  • ACTIVE: Members are in this state when the state of a cluster is ACTIVE, NO_MIGRATION, or FROZEN. See Cluster States on this page.
  • PASSIVE: Members transition to this state in the following circumstances:
    • During a graceful shutdown. When the graceful shutdown process is completed, the member's state changes to SHUT_DOWN.
    • When the cluster's state is manually changed to PASSIVE.
  • SHUT_DOWN: Members transition to this state when they are shut down. Members in this state reject all operations and invocations and cannot be restarted.

Change a cluster's state​

To change a cluster's state, you can use one of the following:

note

You cannot change a cluster's state while members are repartitioning or backing up data.