Synced flush failed problem

Elasticsearch 6.2.3
The index has five primary shards and replicas is set to 1. Each shard is about 30GB.
The cluster health is Green. And no data is being wrtten to the index. When I execute POST myindex/_flush/synced, it returns me as follows:

{
	"_shards": {
		"total": 10,
		"successful": 9,
		"failed": 1
	},
	"myindex": {
		"total": 10,
		"success": 9,
		"failed": 1,
		"failures": [
			"shard": 4,
			"reason": "out of sync replica; num docs on replica[39584455]; num docs on primary [39584456]",
			"routing": {
				"state": "STARTED",
				"primary": false,
				"node": "RYgC4fPCR8iYlYoPmungJw",
				"relocation_node": null,
				"shard": 4,
				"index": "myindex",
				"allocation_id": {
					"id": "u610fs_-QVO0_TU-3D8rTw"
				}
			}
		]
	}
}

As it says, the 4th primary shards docs count is 39584456, while the 4th replica shards docs count is 39584455.
I have no idea how to resolve this problem.

The quick fix that I can think of is to drop the replica and readd it. That won't troubleshoot why this happened though.

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