Primary-replica resync completed with operations – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch has completed the resynchronization process between the primary shard and its replicas. This is not an error but an informational message indicating that the resync process has finished successfully. If you’re seeing this frequently, it might be due to frequent network partitions or node failures. To resolve this, ensure your network is stable, increase the fault tolerance of your Elasticsearch cluster, or adjust the shard allocation settings to prevent unnecessary resyncs.

This guide will help you check for common problems that cause the log ” primary-replica resync completed with {} operations ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, shard.

Log Context

Log “primary-replica resync completed with {} operations” classname is IndexShard.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                            engine.fillSeqNoGaps(newPrimaryTerm);
                            replicationTracker.updateLocalCheckpoint(currentRouting.allocationId().getId(); getLocalCheckpoint());
                            primaryReplicaSyncer.accept(this; new ActionListener() {
                                @Override
                                public void onResponse(ResyncTask resyncTask) {
                                    logger.info("primary-replica resync completed with {} operations"; resyncTask.getResyncedOperations());
                                    boolean resyncCompleted = primaryReplicaResyncInProgress.compareAndSet(true; false);
                                    assert resyncCompleted : "primary-replica resync finished but was not started";
                                }

                                @Override

 

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?