# Old indices being copied between nodes on recovery

**URL:** <https://discuss.elastic.co/t/old-indices-being-copied-between-nodes-on-recovery/105050>\
**Category:** Elasticsearch\
**Created:** [October 24, 2017, 11:42am UTC](https://discuss.elastic.co/t/old-indices-being-copied-between-nodes-on-recovery/105050 "2017-10-24T11:42:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob1727](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@rob1727](https://discuss.elastic.co/u/rob1727)\
**Post date:** [October 24, 2017, 11:42am UTC](https://discuss.elastic.co/t/old-indices-being-copied-between-nodes-on-recovery/105050/1 "2017-10-24T11:42:14Z")

</div>

Hi all,

am looking to put together a simple failover setup.  
Have 2 nodes, 1 shard , 1 replica.

only departure from the elasticsearch.yml defaults are

[cluster.name](http://cluster.name): mycluster  
[node.name](http://node.name): node1/node2  
index.number\_of\_shards: 1  
index.number\_of\_replicas: 1  
http.port: 9210  
http.compression: true

The index increments, eg if we have an index called "index\_v1", then on re-indexing it is updated to "index\_v2" (and the "index\_v1" folder is removed from "C:\Elasticsearch\data\mycluster\nodes\0\indices.

Issue I have is.

1- node1(master) and node2 both have index "index\_v1"

2 - node1 fails. node2 becomes master.

3 - automated re-indexing kicks in and node2 updates to "index\_v2"

4 - restart node1.

5 - node1 and node2 communicate and we end up with "index\_v1" and "index\_v2" on each node (!)

My questions are...

a) is this the expected behaviour?

and

b) is there any way to have node1 update to the latest index, so we end up with just "index\_v2 " on both nodes after a recovery?

Thanks for all and any help.

---

<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:** [October 24, 2017, 5:47pm UTC](https://discuss.elastic.co/t/old-indices-being-copied-between-nodes-on-recovery/105050/2 "2017-10-24T17:47:23Z")

</div>

Yes this is expected.  
If you don't want the "old" index on both nodes, delete it using the APIs.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 24, 2017, 5:59pm UTC](https://discuss.elastic.co/t/old-indices-being-copied-between-nodes-on-recovery/105050/3 "2017-10-24T17:59:16Z")

</div>

If you have 2 master eligible nodes in your cluster, you should set 'minimum\_master\_nodes' to 2 in order to avoid split-brain scenarios. This would prevent one of the nodes to be elected master when one is missing (correct behaviour), which is why we always recommend having a minimum of 3 master eligible ondes in a cluster (this allows cluster to continue operating when one onde is down).

---

<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:** [November 21, 2017, 5:59pm UTC](https://discuss.elastic.co/t/old-indices-being-copied-between-nodes-on-recovery/105050/4 "2017-11-21T17:59:38Z")

</div>

Closed on November 21, 2017, 5:59pm UTC

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