# Synced flush failed problem

**URL:** <https://discuss.elastic.co/t/synced-flush-failed-problem/247937>\
**Category:** Elasticsearch\
**Created:** [September 9, 2020, 3:05am UTC](https://discuss.elastic.co/t/synced-flush-failed-problem/247937 "2020-09-09T03:05:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincentduan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincentduan/32/30691_2.png) [@vincentduan](https://discuss.elastic.co/u/vincentduan)\
**Post date:** [September 9, 2020, 3:05am UTC](https://discuss.elastic.co/t/synced-flush-failed-problem/247937/1 "2020-09-09T03:05:09Z")

</div>

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:

```auto
{
	"_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.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 9, 2020, 4:00am UTC](https://discuss.elastic.co/t/synced-flush-failed-problem/247937/2 "2020-09-09T04:00:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 7, 2020, 4:00am UTC](https://discuss.elastic.co/t/synced-flush-failed-problem/247937/3 "2020-10-07T04:00:32Z")

</div>

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