Resetting current desired balance – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.8-8.9

Briefly, this error occurs when Elasticsearch is trying to rebalance the shards across the nodes in the cluster. This can happen when a node is added or removed, or when a shard is created or deleted. To resolve this issue, you can try to manually rebalance the shards using the Cluster Reroute API, or you can adjust the cluster settings to control the shard allocation process. Also, ensure that your nodes have enough resources (CPU, memory, disk space) to handle the shards.

This guide will help you check for common problems that cause the log ” Resetting current desired balance ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: routing, allocation, cluster.

Log Context

Log “Resetting current desired balance” classname is DesiredBalanceShardsAllocator.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                }
            }

            private DesiredBalance getInitialDesiredBalance() {
                if (resetCurrentDesiredBalance) {
                    logger.info("Resetting current desired balance");
                    resetCurrentDesiredBalance = false;
                    return new DesiredBalance(currentDesiredBalance.lastConvergedIndex(); Map.of());
                } else {
                    return currentDesiredBalance;
                }

 

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?