{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67308","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67308/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67308/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67308/events","html_url":"https://github.com/kubernetes/kubernetes/pull/67308","id":349783707,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3ODA0MjA2","number":67308,"title":"Use monotonically increasing generation to prevent equivalence cache race","user":{"login":"cofyc","id":91730,"node_id":"MDQ6VXNlcjkxNzMw","avatar_url":"https://avatars3.githubusercontent.com/u/91730?v=4","gravatar_id":"","url":"https://api.github.com/users/cofyc","html_url":"https://github.com/cofyc","followers_url":"https://api.github.com/users/cofyc/followers","following_url":"https://api.github.com/users/cofyc/following{/other_user}","gists_url":"https://api.github.com/users/cofyc/gists{/gist_id}","starred_url":"https://api.github.com/users/cofyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cofyc/subscriptions","organizations_url":"https://api.github.com/users/cofyc/orgs","repos_url":"https://api.github.com/users/cofyc/repos","events_url":"https://api.github.com/users/cofyc/events{/privacy}","received_events_url":"https://api.github.com/users/cofyc/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"node_id":"MDU6TGFiZWw0NzczOTcwODY=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":200149833,"node_id":"MDU6TGFiZWwyMDAxNDk4MzM=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note","name":"release-note","color":"c2e0c6","default":false},{"id":125550211,"node_id":"MDU6TGFiZWwxMjU1NTAyMTE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/scheduling","name":"sig/scheduling","color":"d2b48c","default":false},{"id":483069764,"node_id":"MDU6TGFiZWw0ODMwNjk3NjQ=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/testing","name":"sig/testing","color":"d2b48c","default":false},{"id":253450978,"node_id":"MDU6TGFiZWwyNTM0NTA5Nzg=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900","default":false}],"state":"open","locked":false,"assignee":{"login":"msau42","id":24448061,"node_id":"MDQ6VXNlcjI0NDQ4MDYx","avatar_url":"https://avatars3.githubusercontent.com/u/24448061?v=4","gravatar_id":"","url":"https://api.github.com/users/msau42","html_url":"https://github.com/msau42","followers_url":"https://api.github.com/users/msau42/followers","following_url":"https://api.github.com/users/msau42/following{/other_user}","gists_url":"https://api.github.com/users/msau42/gists{/gist_id}","starred_url":"https://api.github.com/users/msau42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msau42/subscriptions","organizations_url":"https://api.github.com/users/msau42/orgs","repos_url":"https://api.github.com/users/msau42/repos","events_url":"https://api.github.com/users/msau42/events{/privacy}","received_events_url":"https://api.github.com/users/msau42/received_events","type":"User","site_admin":false},"assignees":[{"login":"resouer","id":1701782,"node_id":"MDQ6VXNlcjE3MDE3ODI=","avatar_url":"https://avatars3.githubusercontent.com/u/1701782?v=4","gravatar_id":"","url":"https://api.github.com/users/resouer","html_url":"https://github.com/resouer","followers_url":"https://api.github.com/users/resouer/followers","following_url":"https://api.github.com/users/resouer/following{/other_user}","gists_url":"https://api.github.com/users/resouer/gists{/gist_id}","starred_url":"https://api.github.com/users/resouer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resouer/subscriptions","organizations_url":"https://api.github.com/users/resouer/orgs","repos_url":"https://api.github.com/users/resouer/repos","events_url":"https://api.github.com/users/resouer/events{/privacy}","received_events_url":"https://api.github.com/users/resouer/received_events","type":"User","site_admin":false},{"login":"misterikkit","id":1796778,"node_id":"MDQ6VXNlcjE3OTY3Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1796778?v=4","gravatar_id":"","url":"https://api.github.com/users/misterikkit","html_url":"https://github.com/misterikkit","followers_url":"https://api.github.com/users/misterikkit/followers","following_url":"https://api.github.com/users/misterikkit/following{/other_user}","gists_url":"https://api.github.com/users/misterikkit/gists{/gist_id}","starred_url":"https://api.github.com/users/misterikkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misterikkit/subscriptions","organizations_url":"https://api.github.com/users/misterikkit/orgs","repos_url":"https://api.github.com/users/misterikkit/repos","events_url":"https://api.github.com/users/misterikkit/events{/privacy}","received_events_url":"https://api.github.com/users/misterikkit/received_events","type":"User","site_admin":false},{"login":"msau42","id":24448061,"node_id":"MDQ6VXNlcjI0NDQ4MDYx","avatar_url":"https://avatars3.githubusercontent.com/u/24448061?v=4","gravatar_id":"","url":"https://api.github.com/users/msau42","html_url":"https://github.com/msau42","followers_url":"https://api.github.com/users/msau42/followers","following_url":"https://api.github.com/users/msau42/following{/other_user}","gists_url":"https://api.github.com/users/msau42/gists{/gist_id}","starred_url":"https://api.github.com/users/msau42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msau42/subscriptions","organizations_url":"https://api.github.com/users/msau42/orgs","repos_url":"https://api.github.com/users/msau42/repos","events_url":"https://api.github.com/users/msau42/events{/privacy}","received_events_url":"https://api.github.com/users/msau42/received_events","type":"User","site_admin":false}],"milestone":null,"comments":25,"created_at":"2018-08-12T04:27:30Z","updated_at":"2018-09-14T06:36:12Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/67308","html_url":"https://github.com/kubernetes/kubernetes/pull/67308","diff_url":"https://github.com/kubernetes/kubernetes/pull/67308.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/67308.patch"},"body":"**What this PR does / why we need it**:\r\n\r\nUse monotonically increasing generation to prevent equivalence cache race.\r\n\r\nBecause invalidating predicate cache invalidates latest cache, but in-flight predicate goroutines may write stale results into cache. This may happen when events occur frequently:\r\n\r\n| objectVersion | invalidation goroutine | predicate goroutine | cacheVersion | status |\r\n| -- | -- | -- | -- | -- |\r\n| v0 -> v1 | cache invalidated | begin to calculate result.v1 | cache.v0 | OK |\r\n| v1 -> v2 | cache invalidated | begin to write result.v1 into cache | no cache | OK |\r\n| v2 |  | result.v1 wrote into cache | cache.v1 | cache mismatch |\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\nFixes #67260\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string \"action required\".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\nUse monotonically increasing generation to prevent scheduler equivalence cache race.\r\n```"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/421246433","html_url":"https://github.com/kubernetes/kubernetes/pull/67308#issuecomment-421246433","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67308","id":421246433,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTI0NjQzMw==","user":{"login":"cofyc","id":91730,"node_id":"MDQ6VXNlcjkxNzMw","avatar_url":"https://avatars3.githubusercontent.com/u/91730?v=4","gravatar_id":"","url":"https://api.github.com/users/cofyc","html_url":"https://github.com/cofyc","followers_url":"https://api.github.com/users/cofyc/followers","following_url":"https://api.github.com/users/cofyc/following{/other_user}","gists_url":"https://api.github.com/users/cofyc/gists{/gist_id}","starred_url":"https://api.github.com/users/cofyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cofyc/subscriptions","organizations_url":"https://api.github.com/users/cofyc/orgs","repos_url":"https://api.github.com/users/cofyc/repos","events_url":"https://api.github.com/users/cofyc/events{/privacy}","received_events_url":"https://api.github.com/users/cofyc/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T06:36:12Z","updated_at":"2018-09-14T06:36:12Z","author_association":"CONTRIBUTOR","body":"Any other concerns?"}}
{"actor":{"display_login":"cofyc"}}