{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/16728","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16728/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16728/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16728/events","html_url":"https://github.com/elastic/elasticsearch/issues/16728","id":134749963,"number":16728,"title":"Documentation is misleading regarding write consistency","user":{"login":"haizaar","id":58201,"avatar_url":"https://avatars.githubusercontent.com/u/58201?v=3","gravatar_id":"","url":"https://api.github.com/users/haizaar","html_url":"https://github.com/haizaar","followers_url":"https://api.github.com/users/haizaar/followers","following_url":"https://api.github.com/users/haizaar/following{/other_user}","gists_url":"https://api.github.com/users/haizaar/gists{/gist_id}","starred_url":"https://api.github.com/users/haizaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haizaar/subscriptions","organizations_url":"https://api.github.com/users/haizaar/orgs","repos_url":"https://api.github.com/users/haizaar/repos","events_url":"https://api.github.com/users/haizaar/events{/privacy}","received_events_url":"https://api.github.com/users/haizaar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/docs","name":"docs","color":"b3694f"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-19T01:56:38Z","updated_at":"2016-02-25T18:35:06Z","closed_at":null,"body":"The [guide](https://www.elastic.co/guide/en/elasticsearch/guide/master/distrib-write.html) says:\r\n\r\n> Here is the sequence of steps necessary to successfully create, index, or delete a document on both the primary and any replica shards:\r\n> \r\n> 1. The client sends a create, index, or delete request to Node 1.\r\n> 2. The node uses the document’s _id to determine that the document belongs to shard 0. It forwards the request to Node 3, where the primary copy of shard 0 is currently allocated.\r\n>3. Node 3 executes the request on the primary shard. If it is successful, it forwards the request in parallel to the replica shards on Node 1 and Node 2. **Once _all_ of the replica** shards report success, Node 3 reports success to the coordinating node, which reports success to the client.\r\n\r\nHowever according to the latest resiliency talk from Elastic{ON} 2016, this is not the case, otherwise #7572 would not happen. According to the presenter (and the [comment](https://github.com/elastic/elasticsearch/issues/7572#issuecomment-59893514) in the issue), the actual situation is as follows:\r\n\r\n1. Primary shard receives indexing request\r\n2. Primary shard checks that all/quorum replicas are online and fails request otherwise\r\n3. Primary shard performs index operation on itself\r\n4. Primary shard acks success to the client\r\n5. Primary shard sends indexing request to replicas\r\n\r\nThe documentation is very misleading making a reader to believe that by the time he gets ack, its data already exists on all/quorum replicas, i.e. safe; and that's not the case.\r\n\r\nI think that this behavior should be clearly outlined, until this issue is fixed in 5.x, both in the guide link above and in the [reference](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-consistency).\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/188921367","html_url":"https://github.com/elastic/elasticsearch/issues/16728#issuecomment-188921367","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16728","id":188921367,"user":{"login":"haizaar","id":58201,"avatar_url":"https://avatars.githubusercontent.com/u/58201?v=3","gravatar_id":"","url":"https://api.github.com/users/haizaar","html_url":"https://github.com/haizaar","followers_url":"https://api.github.com/users/haizaar/followers","following_url":"https://api.github.com/users/haizaar/following{/other_user}","gists_url":"https://api.github.com/users/haizaar/gists{/gist_id}","starred_url":"https://api.github.com/users/haizaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haizaar/subscriptions","organizations_url":"https://api.github.com/users/haizaar/orgs","repos_url":"https://api.github.com/users/haizaar/repos","events_url":"https://api.github.com/users/haizaar/events{/privacy}","received_events_url":"https://api.github.com/users/haizaar/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T18:35:06Z","updated_at":"2016-02-25T18:35:06Z","body":"Will it help if I submit pull request that clarifies the issue?\nOn 25 Feb 2016 8:31 pm, \"Shane Connelly\" <notifications@github.com> wrote:\n\n> We're aware of a number of issues with the definitive guide, which wasn't\n> updated for 2.x. Unfortunately, this is just one exampke of quite a number\n> of pages in that book which are not accurate currently. So we're actively\n> in the process of rewriting it, as noted at the top of all pages in that\n> guide. Thanks for pointing this one out specifically.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/elastic/elasticsearch/issues/16728#issuecomment-188919953>\n> .\n>\n"}}