Can t to issue sync id for out of sync replica with num docs num docs on primary – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7-7.3

Briefly, this error occurs when there is a discrepancy in the number of documents between the primary shard and its replica in Elasticsearch. This could be due to a failed indexing operation or a network issue. To resolve this, you can try re-indexing the data, or manually force a shard reallocation. If the issue persists, consider checking the cluster’s health and the node logs for any underlying issues. Also, ensure that the network connectivity between the nodes is stable.

This guide will help you check for common problems that cause the log ” {} can’t to issue sync id [{}] for out of sync replica [{}] with num docs [{}]; num docs on primary [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: flush, indices.

Log Context

Log “{} can’t to issue sync id [{}] for out of sync replica [{}] with num docs [{}]; num docs on primary [{}]” classname is SyncedFlushService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                continue;
            }
            if (preSyncedResponse.numDocs != numDocsOnPrimary &&
                preSyncedResponse.numDocs != PreSyncedFlushResponse.UNKNOWN_NUM_DOCS &&
                numDocsOnPrimary != PreSyncedFlushResponse.UNKNOWN_NUM_DOCS) {
                logger.warn("{} can't to issue sync id [{}] for out of sync replica [{}] with num docs [{}]; num docs on primary [{}]";
                    shardId; syncId; shard; preSyncedResponse.numDocs; numDocsOnPrimary);
                results.put(shard; new ShardSyncedFlushResponse("out of sync replica; " +
                    "num docs on replica [" + preSyncedResponse.numDocs + "]; num docs on primary [" + numDocsOnPrimary + "]"));
                countDownAndSendResponseIfDone(syncId; shards; shardId; totalShards; listener; countDown; results);
                continue;

 

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?