There’s also an edge-case with shard allocation during cluster restarts that can result in the loss of data if a shard is being re-allocated.
I saw this behaviour in 0.90.1, recently upgraded to 0.90.10 and haven’t had a failure case like this yet. My use case is logstash style daily indexes for logging data:
Start:
Node 1 [0] [1]
Node 2 [1] [2]
Node 3 [2] [0]
Node 3 goes away, with allocation enabled () mean initializing:
Node 1 [0] [1] (2)
Node 2 [1] [2] (0)
Now, Node 3 comes back, since those shards are being reallocated, it drops its copies.
Node 1 [0] [1] (2)
Node 2 [1] [2] (0)
Node 3 —
Node 2 goes away after that, allocation still enabled,
Node 1 [0] [1] (2)
Node 3 (0) (1) (2)
There is now no full copy of shard 2, just two initialising copies which are incomplete and corrupt.
When node 2 comes back into the cluster, it will discard it’s complete, uncorrupted copy of shard 2, rendering the entire index unusable, and you lose the entire index.
I personally do not consider ElasticSearch a primary data store, so this isn’t an issue given the power it provides. I never expect ElasticSearch to be a reliable data store, and I think that’s OK. It has no built-in ACLs, which means even if this and the rest of the allocation related edge-cases were solved, anyone with access to port 9200 can CRUD your data.
--
Brad Lhotsky
On 12 Feb 2014 at 04:00:01, Mark Walkom (markw@campaignmonitor.com) wrote:
Split brain would be one of the main one I can think of.
Though I know some people have had issues with primary shards not initialising, though I am not sure what would cause that.
Regards,
Mark Walkom
Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com
On 12 February 2014 08:10, Mohit Anchlia mohitanchlia@gmail.com wrote:
I've read some blogs and some email groups where users have indicated they have had data loss. In some cases user is able to recover using the source. I am wondering what are the common reasons this could happen due to ES software issue assuming there are 2+ replicas and multiple nodes available? --
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAOT3TWr%2BgDoo_gsUbDe59-%3DpxirRpnvYgQCeD4t_9Fqqg9tidQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAEM624a_bPZ7x1YieKVsFGE2dyKn19ADFgK%2BJYbEMf9nKF7hJw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.52fb583b.327b23c6.1375%40splitbrain.local.
For more options, visit https://groups.google.com/groups/opt_out.