{"action":"created","comment":{"url":"https://api.github.com/repos/onyx-platform/onyx/pulls/comments/43135079","id":43135079,"diff_hunk":"@@ -59,5 +59,8 @@\n   (loop [jobs* jobs n* n]\n     (if (zero? n*)\n       jobs*\n-      (recur (update-in jobs* [(select-job-requiring-peer replica jobs*)] inc)\n-             (dec n*)))))\n+      (let [job (select-job-requiring-peer replica jobs*)]\n+        (if job","path":"src/onyx/scheduling/balanced_job_scheduler.clj","position":7,"original_position":7,"commit_id":"4abcd154408a9421269245b10b89d524df450a6a","original_commit_id":"4abcd154408a9421269245b10b89d524df450a6a","user":{"login":"lbradstreet","id":252189,"avatar_url":"https://avatars.githubusercontent.com/u/252189?v=3","gravatar_id":"","url":"https://api.github.com/users/lbradstreet","html_url":"https://github.com/lbradstreet","followers_url":"https://api.github.com/users/lbradstreet/followers","following_url":"https://api.github.com/users/lbradstreet/following{/other_user}","gists_url":"https://api.github.com/users/lbradstreet/gists{/gist_id}","starred_url":"https://api.github.com/users/lbradstreet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbradstreet/subscriptions","organizations_url":"https://api.github.com/users/lbradstreet/orgs","repos_url":"https://api.github.com/users/lbradstreet/repos","events_url":"https://api.github.com/users/lbradstreet/events{/privacy}","received_events_url":"https://api.github.com/users/lbradstreet/received_events","type":"User","site_admin":false},"body":"Job may already have the maximum number of peers, and will return nil.","created_at":"2015-10-27T15:12:30Z","updated_at":"2015-10-27T15:12:30Z","html_url":"https://github.com/onyx-platform/onyx/pull/350#discussion_r43135079","pull_request_url":"https://api.github.com/repos/onyx-platform/onyx/pulls/350","_links":{"self":{"href":"https://api.github.com/repos/onyx-platform/onyx/pulls/comments/43135079"},"html":{"href":"https://github.com/onyx-platform/onyx/pull/350#discussion_r43135079"},"pull_request":{"href":"https://api.github.com/repos/onyx-platform/onyx/pulls/350"}}},"pull_request":{"url":"https://api.github.com/repos/onyx-platform/onyx/pulls/350","id":48883999,"html_url":"https://github.com/onyx-platform/onyx/pull/350","diff_url":"https://github.com/onyx-platform/onyx/pull/350.diff","patch_url":"https://github.com/onyx-platform/onyx/pull/350.patch","issue_url":"https://api.github.com/repos/onyx-platform/onyx/issues/350","number":350,"state":"open","locked":false,"title":"Fixes for multiple scheduler bugs (issue #349)","user":{"login":"lbradstreet","id":252189,"avatar_url":"https://avatars.githubusercontent.com/u/252189?v=3","gravatar_id":"","url":"https://api.github.com/users/lbradstreet","html_url":"https://github.com/lbradstreet","followers_url":"https://api.github.com/users/lbradstreet/followers","following_url":"https://api.github.com/users/lbradstreet/following{/other_user}","gists_url":"https://api.github.com/users/lbradstreet/gists{/gist_id}","starred_url":"https://api.github.com/users/lbradstreet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbradstreet/subscriptions","organizations_url":"https://api.github.com/users/lbradstreet/orgs","repos_url":"https://api.github.com/users/lbradstreet/repos","events_url":"https://api.github.com/users/lbradstreet/events{/privacy}","received_events_url":"https://api.github.com/users/lbradstreet/received_events","type":"User","site_admin":false},"body":"Fixes multiple bugs with min-peers and max-peers handling in balanced and percentage schedulers.\r\n\r\nAdds generative tests for these, as well as an additional, commented out, test \"outer-inner-allocations\", which highlights failings in the balanced scheduler which should be addressed later.","created_at":"2015-10-27T15:11:23Z","updated_at":"2015-10-27T15:12:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"141c6851c3150a61e96f784cbab9c4a6505762ac","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/onyx-platform/onyx/pulls/350/commits","review_comments_url":"https://api.github.com/repos/onyx-platform/onyx/pulls/350/comments","review_comment_url":"https://api.github.com/repos/onyx-platform/onyx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/onyx-platform/onyx/issues/350/comments","statuses_url":"https://api.github.com/repos/onyx-platform/onyx/statuses/4abcd154408a9421269245b10b89d524df450a6a","head":{"label":"onyx-platform:reproduce-scheduler-bugs","ref":"reproduce-scheduler-bugs","sha":"4abcd154408a9421269245b10b89d524df450a6a","user":{"login":"onyx-platform","id":11951174,"avatar_url":"https://avatars.githubusercontent.com/u/11951174?v=3","gravatar_id":"","url":"https://api.github.com/users/onyx-platform","html_url":"https://github.com/onyx-platform","followers_url":"https://api.github.com/users/onyx-platform/followers","following_url":"https://api.github.com/users/onyx-platform/following{/other_user}","gists_url":"https://api.github.com/users/onyx-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/onyx-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onyx-platform/subscriptions","organizations_url":"https://api.github.com/users/onyx-platform/orgs","repos_url":"https://api.github.com/users/onyx-platform/repos","events_url":"https://api.github.com/users/onyx-platform/events{/privacy}","received_events_url":"https://api.github.com/users/onyx-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":14849761,"name":"onyx","full_name":"onyx-platform/onyx","owner":{"login":"onyx-platform","id":11951174,"avatar_url":"https://avatars.githubusercontent.com/u/11951174?v=3","gravatar_id":"","url":"https://api.github.com/users/onyx-platform","html_url":"https://github.com/onyx-platform","followers_url":"https://api.github.com/users/onyx-platform/followers","following_url":"https://api.github.com/users/onyx-platform/following{/other_user}","gists_url":"https://api.github.com/users/onyx-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/onyx-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onyx-platform/subscriptions","organizations_url":"https://api.github.com/users/onyx-platform/orgs","repos_url":"https://api.github.com/users/onyx-platform/repos","events_url":"https://api.github.com/users/onyx-platform/events{/privacy}","received_events_url":"https://api.github.com/users/onyx-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/onyx-platform/onyx","description":"Distributed, masterless, high performance, fault tolerant data processing for Clojure","fork":false,"url":"https://api.github.com/repos/onyx-platform/onyx","forks_url":"https://api.github.com/repos/onyx-platform/onyx/forks","keys_url":"https://api.github.com/repos/onyx-platform/onyx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/onyx-platform/onyx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/onyx-platform/onyx/teams","hooks_url":"https://api.github.com/repos/onyx-platform/onyx/hooks","issue_events_url":"https://api.github.com/repos/onyx-platform/onyx/issues/events{/number}","events_url":"https://api.github.com/repos/onyx-platform/onyx/events","assignees_url":"https://api.github.com/repos/onyx-platform/onyx/assignees{/user}","branches_url":"https://api.github.com/repos/onyx-platform/onyx/branches{/branch}","tags_url":"https://api.github.com/repos/onyx-platform/onyx/tags","blobs_url":"https://api.github.com/repos/onyx-platform/onyx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/onyx-platform/onyx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/onyx-platform/onyx/git/refs{/sha}","trees_url":"https://api.github.com/repos/onyx-platform/onyx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/onyx-platform/onyx/statuses/{sha}","languages_url":"https://api.github.com/repos/onyx-platform/onyx/languages","stargazers_url":"https://api.github.com/repos/onyx-platform/onyx/stargazers","contributors_url":"https://api.github.com/repos/onyx-platform/onyx/contributors","subscribers_url":"https://api.github.com/repos/onyx-platform/onyx/subscribers","subscription_url":"https://api.github.com/repos/onyx-platform/onyx/subscription","commits_url":"https://api.github.com/repos/onyx-platform/onyx/commits{/sha}","git_commits_url":"https://api.github.com/repos/onyx-platform/onyx/git/commits{/sha}","comments_url":"https://api.github.com/repos/onyx-platform/onyx/comments{/number}","issue_comment_url":"https://api.github.com/repos/onyx-platform/onyx/issues/comments{/number}","contents_url":"https://api.github.com/repos/onyx-platform/onyx/contents/{+path}","compare_url":"https://api.github.com/repos/onyx-platform/onyx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/onyx-platform/onyx/merges","archive_url":"https://api.github.com/repos/onyx-platform/onyx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/onyx-platform/onyx/downloads","issues_url":"https://api.github.com/repos/onyx-platform/onyx/issues{/number}","pulls_url":"https://api.github.com/repos/onyx-platform/onyx/pulls{/number}","milestones_url":"https://api.github.com/repos/onyx-platform/onyx/milestones{/number}","notifications_url":"https://api.github.com/repos/onyx-platform/onyx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/onyx-platform/onyx/labels{/name}","releases_url":"https://api.github.com/repos/onyx-platform/onyx/releases{/id}","created_at":"2013-12-02T01:21:14Z","updated_at":"2015-10-26T22:25:39Z","pushed_at":"2015-10-27T15:11:24Z","git_url":"git://github.com/onyx-platform/onyx.git","ssh_url":"git@github.com:onyx-platform/onyx.git","clone_url":"https://github.com/onyx-platform/onyx.git","svn_url":"https://github.com/onyx-platform/onyx","homepage":"","size":11586,"stargazers_count":888,"watchers_count":888,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":73,"mirror_url":null,"open_issues_count":39,"forks":73,"open_issues":39,"watchers":888,"default_branch":"0.7.x"}},"base":{"label":"onyx-platform:develop","ref":"develop","sha":"b681c16223725c84bf6b056a7ead2b7e6d722d6a","user":{"login":"onyx-platform","id":11951174,"avatar_url":"https://avatars.githubusercontent.com/u/11951174?v=3","gravatar_id":"","url":"https://api.github.com/users/onyx-platform","html_url":"https://github.com/onyx-platform","followers_url":"https://api.github.com/users/onyx-platform/followers","following_url":"https://api.github.com/users/onyx-platform/following{/other_user}","gists_url":"https://api.github.com/users/onyx-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/onyx-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onyx-platform/subscriptions","organizations_url":"https://api.github.com/users/onyx-platform/orgs","repos_url":"https://api.github.com/users/onyx-platform/repos","events_url":"https://api.github.com/users/onyx-platform/events{/privacy}","received_events_url":"https://api.github.com/users/onyx-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":14849761,"name":"onyx","full_name":"onyx-platform/onyx","owner":{"login":"onyx-platform","id":11951174,"avatar_url":"https://avatars.githubusercontent.com/u/11951174?v=3","gravatar_id":"","url":"https://api.github.com/users/onyx-platform","html_url":"https://github.com/onyx-platform","followers_url":"https://api.github.com/users/onyx-platform/followers","following_url":"https://api.github.com/users/onyx-platform/following{/other_user}","gists_url":"https://api.github.com/users/onyx-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/onyx-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onyx-platform/subscriptions","organizations_url":"https://api.github.com/users/onyx-platform/orgs","repos_url":"https://api.github.com/users/onyx-platform/repos","events_url":"https://api.github.com/users/onyx-platform/events{/privacy}","received_events_url":"https://api.github.com/users/onyx-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/onyx-platform/onyx","description":"Distributed, masterless, high performance, fault tolerant data processing for Clojure","fork":false,"url":"https://api.github.com/repos/onyx-platform/onyx","forks_url":"https://api.github.com/repos/onyx-platform/onyx/forks","keys_url":"https://api.github.com/repos/onyx-platform/onyx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/onyx-platform/onyx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/onyx-platform/onyx/teams","hooks_url":"https://api.github.com/repos/onyx-platform/onyx/hooks","issue_events_url":"https://api.github.com/repos/onyx-platform/onyx/issues/events{/number}","events_url":"https://api.github.com/repos/onyx-platform/onyx/events","assignees_url":"https://api.github.com/repos/onyx-platform/onyx/assignees{/user}","branches_url":"https://api.github.com/repos/onyx-platform/onyx/branches{/branch}","tags_url":"https://api.github.com/repos/onyx-platform/onyx/tags","blobs_url":"https://api.github.com/repos/onyx-platform/onyx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/onyx-platform/onyx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/onyx-platform/onyx/git/refs{/sha}","trees_url":"https://api.github.com/repos/onyx-platform/onyx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/onyx-platform/onyx/statuses/{sha}","languages_url":"https://api.github.com/repos/onyx-platform/onyx/languages","stargazers_url":"https://api.github.com/repos/onyx-platform/onyx/stargazers","contributors_url":"https://api.github.com/repos/onyx-platform/onyx/contributors","subscribers_url":"https://api.github.com/repos/onyx-platform/onyx/subscribers","subscription_url":"https://api.github.com/repos/onyx-platform/onyx/subscription","commits_url":"https://api.github.com/repos/onyx-platform/onyx/commits{/sha}","git_commits_url":"https://api.github.com/repos/onyx-platform/onyx/git/commits{/sha}","comments_url":"https://api.github.com/repos/onyx-platform/onyx/comments{/number}","issue_comment_url":"https://api.github.com/repos/onyx-platform/onyx/issues/comments{/number}","contents_url":"https://api.github.com/repos/onyx-platform/onyx/contents/{+path}","compare_url":"https://api.github.com/repos/onyx-platform/onyx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/onyx-platform/onyx/merges","archive_url":"https://api.github.com/repos/onyx-platform/onyx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/onyx-platform/onyx/downloads","issues_url":"https://api.github.com/repos/onyx-platform/onyx/issues{/number}","pulls_url":"https://api.github.com/repos/onyx-platform/onyx/pulls{/number}","milestones_url":"https://api.github.com/repos/onyx-platform/onyx/milestones{/number}","notifications_url":"https://api.github.com/repos/onyx-platform/onyx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/onyx-platform/onyx/labels{/name}","releases_url":"https://api.github.com/repos/onyx-platform/onyx/releases{/id}","created_at":"2013-12-02T01:21:14Z","updated_at":"2015-10-26T22:25:39Z","pushed_at":"2015-10-27T15:11:24Z","git_url":"git://github.com/onyx-platform/onyx.git","ssh_url":"git@github.com:onyx-platform/onyx.git","clone_url":"https://github.com/onyx-platform/onyx.git","svn_url":"https://github.com/onyx-platform/onyx","homepage":"","size":11586,"stargazers_count":888,"watchers_count":888,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":73,"mirror_url":null,"open_issues_count":39,"forks":73,"open_issues":39,"watchers":888,"default_branch":"0.7.x"}},"_links":{"self":{"href":"https://api.github.com/repos/onyx-platform/onyx/pulls/350"},"html":{"href":"https://github.com/onyx-platform/onyx/pull/350"},"issue":{"href":"https://api.github.com/repos/onyx-platform/onyx/issues/350"},"comments":{"href":"https://api.github.com/repos/onyx-platform/onyx/issues/350/comments"},"review_comments":{"href":"https://api.github.com/repos/onyx-platform/onyx/pulls/350/comments"},"review_comment":{"href":"https://api.github.com/repos/onyx-platform/onyx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/onyx-platform/onyx/pulls/350/commits"},"statuses":{"href":"https://api.github.com/repos/onyx-platform/onyx/statuses/4abcd154408a9421269245b10b89d524df450a6a"}}}}