Updating cluster routing allocation disable replica allocation from to – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when there’s an attempt to disable replica allocation in the Elasticsearch cluster. This is usually done during a rolling upgrade or when performing maintenance to prevent Elasticsearch from reallocating the replicas to other nodes. To resolve this, you can re-enable the replica allocation once the maintenance or upgrade is done by setting the cluster.routing.allocation.enable to ‘all’. Also, ensure that your cluster has enough resources to handle the replica shards. If not, consider adding more nodes or increasing the resources of the existing nodes.

This guide will help you check for common problems that cause the log ” updating [cluster.routing.allocation.disable_replica_allocation] from [{}] to [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: allocation, cluster and routing.

Log Context

Log “updating [cluster.routing.allocation.disable_replica_allocation] from [{}] to [{}]” classname is DisableAllocationDecider.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                 DisableAllocationDecider.this.disableAllocation = disableAllocation;
            }

            boolean disableReplicaAllocation = settings.getAsBoolean(CLUSTER_ROUTING_ALLOCATION_DISABLE_REPLICA_ALLOCATION; DisableAllocationDecider.this.disableReplicaAllocation);
            if (disableReplicaAllocation != DisableAllocationDecider.this.disableReplicaAllocation) {
                logger.info("updating [cluster.routing.allocation.disable_replica_allocation] from [{}] to [{}]"; DisableAllocationDecider.this.disableReplicaAllocation; disableReplicaAllocation);
                DisableAllocationDecider.this.disableReplicaAllocation = disableReplicaAllocation;
            }
        }
    }





 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?