ES 6.2.4 What should be done when having "out of sync replica" error

I just hit this issue when trying to close some indexes in the cluster.

What are the recommended actions that one should take in order to resolve this problem?

I have read this thread Out Of Sync Replica and this thread Replicas out of sync and looks like my cluster might be having this issue because there are certain indexes in my cluster where some documents are created and then deleted in close successions. Although, I also have to add that we've had this behaviour (creating and deleting in close succesions) for a long while now on 6.2.4 and this is the first time we've hit this issue in our cluster.

Hey @ld_pvl

When we hit the issue we had to scale the number of replicas on the index down to 0 and then back up again so they're built from scratch.

Worth saying that since we upgraded to 6.3 we've not seen the issue occur again.

1 Like

Thanks Michael,

I will give that a try and that also gives me a reason to upgrade now.

1 Like

Yep it worked.

To summarise what I did.

Changed the index settings to set number of replicas to 0:

curl -X PUT "my_host:9200/problematic_indexes/_settings" -H 'Content-Type: application/json' -d'
{
    "index" : {
        "number_of_replicas" : 0
    }
}
'

Then back up to whatever number again:

curl -X PUT "my_host:9200/problematic_indexes/_settings" -H 'Content-Type: application/json' -d'
{
    "index" : {
        "number_of_replicas" : <googol>
    }
}
'

Now it's time to upgrade to 6.3.

Thanks again!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.