{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/21656","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/21656/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/21656/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/21656/events","html_url":"https://github.com/elastic/elasticsearch/pull/21656","id":190316305,"number":21656,"title":"Allow master to assign primary shard to node that has shard store locked during shard state fetching","user":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"labels":[{"id":144797753,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Allocation","name":":Allocation","color":"009800","default":false},{"id":92913658,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/blocker","name":"blocker","color":"e11d21","default":false},{"id":23173,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/bug","name":"bug","color":"9e2c2c","default":true},{"id":92913730,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/critical","name":"critical","color":"eb6420","default":false},{"id":475845060,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v5.0.2","name":"v5.0.2","color":"dddddd","default":false},{"id":408109539,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v5.1.0","name":"v5.1.0","color":"dddddd","default":false},{"id":334286612,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v6.0.0","name":"v6.0.0","color":"dddddd","default":false}],"state":"open","locked":false,"assignee":{"login":"bleskes","id":1006375,"avatar_url":"https://avatars.githubusercontent.com/u/1006375?v=3","gravatar_id":"","url":"https://api.github.com/users/bleskes","html_url":"https://github.com/bleskes","followers_url":"https://api.github.com/users/bleskes/followers","following_url":"https://api.github.com/users/bleskes/following{/other_user}","gists_url":"https://api.github.com/users/bleskes/gists{/gist_id}","starred_url":"https://api.github.com/users/bleskes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleskes/subscriptions","organizations_url":"https://api.github.com/users/bleskes/orgs","repos_url":"https://api.github.com/users/bleskes/repos","events_url":"https://api.github.com/users/bleskes/events{/privacy}","received_events_url":"https://api.github.com/users/bleskes/received_events","type":"User","site_admin":false},"assignees":[{"login":"bleskes","id":1006375,"avatar_url":"https://avatars.githubusercontent.com/u/1006375?v=3","gravatar_id":"","url":"https://api.github.com/users/bleskes","html_url":"https://github.com/bleskes","followers_url":"https://api.github.com/users/bleskes/followers","following_url":"https://api.github.com/users/bleskes/following{/other_user}","gists_url":"https://api.github.com/users/bleskes/gists{/gist_id}","starred_url":"https://api.github.com/users/bleskes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleskes/subscriptions","organizations_url":"https://api.github.com/users/bleskes/orgs","repos_url":"https://api.github.com/users/bleskes/repos","events_url":"https://api.github.com/users/bleskes/events{/privacy}","received_events_url":"https://api.github.com/users/bleskes/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2016-11-18T13:13:10Z","updated_at":"2016-11-22T16:09:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/21656","html_url":"https://github.com/elastic/elasticsearch/pull/21656","diff_url":"https://github.com/elastic/elasticsearch/pull/21656.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/21656.patch"},"body":"PR #19416 added a safety mechanism to shard state fetching to only access the store when the shard lock can be acquired. This can lead to the following situation however where a shard has not fully shut down yet while the shard fetching is going on, resulting in a `ShardLockObtainFailedException`. `PrimaryShardAllocator` that decides where to allocate primary shards sees this exception and treats the shard as unusable. If this is the only shard copy in the cluster, the cluster stays red and a new shard fetching cycle will not be triggered as shard state fetching treats exceptions while opening the store as permanent failures.\r\n\r\nThis PR makes it so that `PrimaryShardAllocator` treats the locked shard as a possible allocation target (although with the least priority)."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/262283822","html_url":"https://github.com/elastic/elasticsearch/pull/21656#issuecomment-262283822","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/21656","id":262283822,"user":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T16:09:02Z","updated_at":"2016-11-22T16:09:02Z","body":"@bleskes I've pushed 3e64d74 addressing comments."}}
{"actor":{"display_login":"ywelsch"}}