Search code examples
javaelasticsearchelasticsearch-5reroute

What will happen if ElasticSearch shard allocation fails in between? What i mean is i am relocating a shard from nodeA to NodeB using reroute API


So I'm moving shard(20gb) data from one node to another node using reroute request, if a failure occurs (node is down) in between where only a part of data moved to destination node, and when node starts again what will happen with this corrupt data

Reroute request actually moves data from one node to other or just Copies the data ?

NOTE: Both the nodes are in the same cluster and there are no replicas in the cluster.

I wanna know what happens with the corrupt data once the node restarts.


Solution

  • The reroute operation copies the data from one node to another, and only upon successful completion, removes the data from the source node. So if your target node fails for some reason and stops, the reroute operation stops, the partial shard on the target node is removed and nothing changes, your data is safe.