Starting to track leader shard – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

Briefly, this error occurs when Elasticsearch begins to track the leader shard in a replication process. It’s not an error, but an informational message indicating that the Elasticsearch node has started to replicate data from the leader shard. If you’re seeing this message frequently, it might be due to network instability or node failures causing frequent leader changes. To resolve this, ensure your network is stable, your nodes are healthy, and your cluster is properly configured. Also, consider adjusting your shard allocation settings to prevent frequent leader changes.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” {} Starting to track leader shard {} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, shard.

Log Context

Log “{} Starting to track leader shard {}” classname is ShardFollowTasksExecutor.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

    @Override
    protected void nodeOperation(final AllocatedPersistentTask task; final ShardFollowTask params; final PersistentTaskState state) {
        Client followerClient = wrapClient(client; params.getHeaders(); clusterService.state());
        ShardFollowNodeTask shardFollowNodeTask = (ShardFollowNodeTask) task;
        logger.info("{} Starting to track leader shard {}"; params.getFollowShardId(); params.getLeaderShardId());

        FollowerStatsInfoHandler handler = (followerHistoryUUID; followerGCP; maxSeqNo) -> {
            shardFollowNodeTask.start(followerHistoryUUID; followerGCP; maxSeqNo; followerGCP; maxSeqNo);
        };
        Consumer errorHandler = e -> {

 

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?