{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/3299","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/3299/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/3299/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/3299/events","html_url":"https://github.com/cockroachdb/cockroach/issues/3299","id":120057848,"number":3299,"title":"raft: cancel commands in pending queue","user":{"login":"bdarnell","id":160562,"avatar_url":"https://avatars.githubusercontent.com/u/160562?v=3","gravatar_id":"","url":"https://api.github.com/users/bdarnell","html_url":"https://github.com/bdarnell","followers_url":"https://api.github.com/users/bdarnell/followers","following_url":"https://api.github.com/users/bdarnell/following{/other_user}","gists_url":"https://api.github.com/users/bdarnell/gists{/gist_id}","starred_url":"https://api.github.com/users/bdarnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdarnell/subscriptions","organizations_url":"https://api.github.com/users/bdarnell/orgs","repos_url":"https://api.github.com/users/bdarnell/repos","events_url":"https://api.github.com/users/bdarnell/events{/privacy}","received_events_url":"https://api.github.com/users/bdarnell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cockroachdb/cockroach/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cockroachdb/cockroach/milestones/1","html_url":"https://github.com/cockroachdb/cockroach/milestones/Beta","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/milestones/1/labels","id":778698,"number":1,"title":"Beta","description":"","creator":{"login":"andybons","id":365204,"avatar_url":"https://avatars.githubusercontent.com/u/365204?v=3","gravatar_id":"","url":"https://api.github.com/users/andybons","html_url":"https://github.com/andybons","followers_url":"https://api.github.com/users/andybons/followers","following_url":"https://api.github.com/users/andybons/following{/other_user}","gists_url":"https://api.github.com/users/andybons/gists{/gist_id}","starred_url":"https://api.github.com/users/andybons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andybons/subscriptions","organizations_url":"https://api.github.com/users/andybons/orgs","repos_url":"https://api.github.com/users/andybons/repos","events_url":"https://api.github.com/users/andybons/events{/privacy}","received_events_url":"https://api.github.com/users/andybons/received_events","type":"User","site_admin":false},"open_issues":152,"closed_issues":154,"state":"open","created_at":"2014-09-04T16:42:18Z","updated_at":"2016-02-22T20:10:20Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-12-02T23:16:23Z","updated_at":"2016-02-22T21:25:47Z","closed_at":null,"body":"Sometimes a command may be proposed to raft but become moot before it is forwarded to the leader and committed. This is especially true of leader lease requests, which have a short expiration and are sometimes retried frequently (#3296). We should be able to cancel these requests while they are in the queue so they don't get replayed when the node connects to the cluster. \r\n\r\n`Replica.proposeRaftCommand` creates a `context.Context` with a deadline. We should pass this context through `Store.ProposeRaftCommand` and into multiraft, and then in the loops over `g.pending` skip anything with an expired `Context`."},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/187389711","html_url":"https://github.com/cockroachdb/cockroach/issues/3299#issuecomment-187389711","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/3299","id":187389711,"user":{"login":"xiang90","id":4479947,"avatar_url":"https://avatars.githubusercontent.com/u/4479947?v=3","gravatar_id":"","url":"https://api.github.com/users/xiang90","html_url":"https://github.com/xiang90","followers_url":"https://api.github.com/users/xiang90/followers","following_url":"https://api.github.com/users/xiang90/following{/other_user}","gists_url":"https://api.github.com/users/xiang90/gists{/gist_id}","starred_url":"https://api.github.com/users/xiang90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiang90/subscriptions","organizations_url":"https://api.github.com/users/xiang90/orgs","repos_url":"https://api.github.com/users/xiang90/repos","events_url":"https://api.github.com/users/xiang90/events{/privacy}","received_events_url":"https://api.github.com/users/xiang90/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T21:25:47Z","updated_at":"2016-02-22T21:25:47Z","body":"Got it. Thanks!"}}