{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/27437466","id":27437466,"diff_hunk":"@@ -100,6 +103,15 @@ func (s *SimpleModeler) listPods(selector labels.Selector) (pods []api.Pod, err\n \t//       need go through that periodically and check for deleted\n \t//       pods.\n \tfor _, pod := range assumed {\n+\t\t// Cached objects with expired ttls do not Exist, so this has the\n+\t\t// effect of purging the cache and only returning valid objects.\n+\t\tpodExists, err := s.assumedPods.Exists(&pod)","path":"plugin/pkg/scheduler/modeler.go","position":25,"original_position":25,"commit_id":"14b976737df1534485b5e714c2afb55e1ac01f0d","original_commit_id":"14b976737df1534485b5e714c2afb55e1ac01f0d","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"body":"This would be much more natural if List expired pods.","created_at":"2015-03-30T22:19:06Z","updated_at":"2015-03-30T22:19:06Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6179#discussion_r27437466","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6179","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/27437466"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6179#discussion_r27437466"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6179"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6179","id":32257844,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6179","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6179.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6179.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6179","number":6179,"state":"open","locked":false,"title":"WIP: Modeler uses a ttl store for assumed pods","user":{"login":"bprashanth","id":10927820,"avatar_url":"https://avatars.githubusercontent.com/u/10927820?v=3","gravatar_id":"","url":"https://api.github.com/users/bprashanth","html_url":"https://github.com/bprashanth","followers_url":"https://api.github.com/users/bprashanth/followers","following_url":"https://api.github.com/users/bprashanth/following{/other_user}","gists_url":"https://api.github.com/users/bprashanth/gists{/gist_id}","starred_url":"https://api.github.com/users/bprashanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bprashanth/subscriptions","organizations_url":"https://api.github.com/users/bprashanth/orgs","repos_url":"https://api.github.com/users/bprashanth/repos","events_url":"https://api.github.com/users/bprashanth/events{/privacy}","received_events_url":"https://api.github.com/users/bprashanth/received_events","type":"User","site_admin":false},"body":"Addresses https://github.com/GoogleCloudPlatform/kubernetes/issues/6023. Making sure I'm going in the right direction.\r\n\r\n1. I can make the TTL implementation stupider but I'd rather not leak storage idoms into the scheduler. So for now the TTLCache implements `Store`, and the listers can use it like they would any other cache.\r\n2. I can dial down `ThreadSafeStore`, but it seemed like a step in the right direction and makes the rest of the PR simpler. ","created_at":"2015-03-30T19:17:47Z","updated_at":"2015-03-30T22:19:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d58c8b9b940d5ea8d424b0187c72424ca8e523d8","assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6179/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6179/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6179/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/14b976737df1534485b5e714c2afb55e1ac01f0d","head":{"label":"bprashanth:ts_ttl_scheduler","ref":"ts_ttl_scheduler","sha":"14b976737df1534485b5e714c2afb55e1ac01f0d","user":{"login":"bprashanth","id":10927820,"avatar_url":"https://avatars.githubusercontent.com/u/10927820?v=3","gravatar_id":"","url":"https://api.github.com/users/bprashanth","html_url":"https://github.com/bprashanth","followers_url":"https://api.github.com/users/bprashanth/followers","following_url":"https://api.github.com/users/bprashanth/following{/other_user}","gists_url":"https://api.github.com/users/bprashanth/gists{/gist_id}","starred_url":"https://api.github.com/users/bprashanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bprashanth/subscriptions","organizations_url":"https://api.github.com/users/bprashanth/orgs","repos_url":"https://api.github.com/users/bprashanth/repos","events_url":"https://api.github.com/users/bprashanth/events{/privacy}","received_events_url":"https://api.github.com/users/bprashanth/received_events","type":"User","site_admin":false},"repo":{"id":30552514,"name":"kubernetes","full_name":"bprashanth/kubernetes","owner":{"login":"bprashanth","id":10927820,"avatar_url":"https://avatars.githubusercontent.com/u/10927820?v=3","gravatar_id":"","url":"https://api.github.com/users/bprashanth","html_url":"https://github.com/bprashanth","followers_url":"https://api.github.com/users/bprashanth/followers","following_url":"https://api.github.com/users/bprashanth/following{/other_user}","gists_url":"https://api.github.com/users/bprashanth/gists{/gist_id}","starred_url":"https://api.github.com/users/bprashanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bprashanth/subscriptions","organizations_url":"https://api.github.com/users/bprashanth/orgs","repos_url":"https://api.github.com/users/bprashanth/repos","events_url":"https://api.github.com/users/bprashanth/events{/privacy}","received_events_url":"https://api.github.com/users/bprashanth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bprashanth/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/bprashanth/kubernetes","forks_url":"https://api.github.com/repos/bprashanth/kubernetes/forks","keys_url":"https://api.github.com/repos/bprashanth/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bprashanth/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bprashanth/kubernetes/teams","hooks_url":"https://api.github.com/repos/bprashanth/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/bprashanth/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/bprashanth/kubernetes/events","assignees_url":"https://api.github.com/repos/bprashanth/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/bprashanth/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/bprashanth/kubernetes/tags","blobs_url":"https://api.github.com/repos/bprashanth/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bprashanth/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bprashanth/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/bprashanth/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bprashanth/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/bprashanth/kubernetes/languages","stargazers_url":"https://api.github.com/repos/bprashanth/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/bprashanth/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/bprashanth/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/bprashanth/kubernetes/subscription","commits_url":"https://api.github.com/repos/bprashanth/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/bprashanth/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/bprashanth/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/bprashanth/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/bprashanth/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/bprashanth/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bprashanth/kubernetes/merges","archive_url":"https://api.github.com/repos/bprashanth/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bprashanth/kubernetes/downloads","issues_url":"https://api.github.com/repos/bprashanth/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/bprashanth/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/bprashanth/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/bprashanth/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bprashanth/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/bprashanth/kubernetes/releases{/id}","created_at":"2015-02-09T18:58:38Z","updated_at":"2015-02-09T18:58:42Z","pushed_at":"2015-03-30T19:03:34Z","git_url":"git://github.com/bprashanth/kubernetes.git","ssh_url":"git@github.com:bprashanth/kubernetes.git","clone_url":"https://github.com/bprashanth/kubernetes.git","svn_url":"https://github.com/bprashanth/kubernetes","homepage":"http://kubernetes.io","size":39990,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"3e0cdff97c2e777bc9669e22f1cf19c79f6036bc","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-03-30T22:13:31Z","pushed_at":"2015-03-30T22:13:31Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":122748,"stargazers_count":6809,"watchers_count":6809,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1301,"mirror_url":null,"open_issues_count":841,"forks":1301,"open_issues":841,"watchers":6809,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6179"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6179"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6179"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6179/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6179/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6179/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/14b976737df1534485b5e714c2afb55e1ac01f0d"}}}}