{"action":"opened","number":65,"pull_request":{"url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/pulls/65","id":80917249,"html_url":"https://github.com/cloudant/couchdb-couch-replicator/pull/65","diff_url":"https://github.com/cloudant/couchdb-couch-replicator/pull/65.diff","patch_url":"https://github.com/cloudant/couchdb-couch-replicator/pull/65.patch","issue_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/issues/65","number":65,"state":"open","locked":false,"title":"Faster handling of crashed jobs in scheduler","user":{"login":"nickva","id":211822,"avatar_url":"https://avatars.githubusercontent.com/u/211822?v=3","gravatar_id":"","url":"https://api.github.com/users/nickva","html_url":"https://github.com/nickva","followers_url":"https://api.github.com/users/nickva/followers","following_url":"https://api.github.com/users/nickva/following{/other_user}","gists_url":"https://api.github.com/users/nickva/gists{/gist_id}","starred_url":"https://api.github.com/users/nickva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickva/subscriptions","organizations_url":"https://api.github.com/users/nickva/orgs","repos_url":"https://api.github.com/users/nickva/repos","events_url":"https://api.github.com/users/nickva/events{/privacy}","received_events_url":"https://api.github.com/users/nickva/received_events","type":"User","site_admin":false},"body":"When a job crashes, scheduler receives a `DOWN` message and tries to start\r\npending jobs. If there is a large number of total jobs in the ets table that\r\ncan take a significant amount of time. For example, even `pending_jobs_count/0`\r\nis still an O(TotalJobs) operation. Combined with a cascading failure, where\r\nlots of jobs in a short period of time, scheduler could be blocked for a very\r\nlong time.\r\n\r\nTo fix, as a heuristic, if total jobs is greater or equal to max jobs running,\r\nassume table is large enough to avoid immediately starting pending jobs after\r\neach crash, instead wait till next reschedule. (The same idea was used in\r\noptimizing starting pending jobs when adding them, so use same strategy to be\r\nconsistent).","created_at":"2016-08-11T08:01:40Z","updated_at":"2016-08-11T08:01:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/pulls/65/commits","review_comments_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/pulls/65/comments","review_comment_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/issues/65/comments","statuses_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/statuses/4da223532fb222328c13c6c5d1797e17a6617978","head":{"label":"cloudant:63012-speed-up-handling-of-crashed-jobs","ref":"63012-speed-up-handling-of-crashed-jobs","sha":"4da223532fb222328c13c6c5d1797e17a6617978","user":{"login":"cloudant","id":44642,"avatar_url":"https://avatars.githubusercontent.com/u/44642?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudant","html_url":"https://github.com/cloudant","followers_url":"https://api.github.com/users/cloudant/followers","following_url":"https://api.github.com/users/cloudant/following{/other_user}","gists_url":"https://api.github.com/users/cloudant/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudant/subscriptions","organizations_url":"https://api.github.com/users/cloudant/orgs","repos_url":"https://api.github.com/users/cloudant/repos","events_url":"https://api.github.com/users/cloudant/events{/privacy}","received_events_url":"https://api.github.com/users/cloudant/received_events","type":"Organization","site_admin":false},"repo":{"id":38246096,"name":"couchdb-couch-replicator","full_name":"cloudant/couchdb-couch-replicator","owner":{"login":"cloudant","id":44642,"avatar_url":"https://avatars.githubusercontent.com/u/44642?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudant","html_url":"https://github.com/cloudant","followers_url":"https://api.github.com/users/cloudant/followers","following_url":"https://api.github.com/users/cloudant/following{/other_user}","gists_url":"https://api.github.com/users/cloudant/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudant/subscriptions","organizations_url":"https://api.github.com/users/cloudant/orgs","repos_url":"https://api.github.com/users/cloudant/repos","events_url":"https://api.github.com/users/cloudant/events{/privacy}","received_events_url":"https://api.github.com/users/cloudant/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudant/couchdb-couch-replicator","description":"Mirror of Apache CouchDB","fork":true,"url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator","forks_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/forks","keys_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/teams","hooks_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/hooks","issue_events_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/issues/events{/number}","events_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/events","assignees_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/assignees{/user}","branches_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/branches{/branch}","tags_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/tags","blobs_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/languages","stargazers_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/stargazers","contributors_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/contributors","subscribers_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/subscribers","subscription_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/subscription","commits_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/contents/{+path}","compare_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/merges","archive_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/downloads","issues_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/issues{/number}","pulls_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/labels{/name}","releases_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/releases{/id}","deployments_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/deployments","created_at":"2015-06-29T12:19:20Z","updated_at":"2016-05-13T14:06:45Z","pushed_at":"2016-08-11T07:54:46Z","git_url":"git://github.com/cloudant/couchdb-couch-replicator.git","ssh_url":"git@github.com:cloudant/couchdb-couch-replicator.git","clone_url":"https://github.com/cloudant/couchdb-couch-replicator.git","svn_url":"https://github.com/cloudant/couchdb-couch-replicator","homepage":null,"size":4956,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"cloudant:63012-scheduler","ref":"63012-scheduler","sha":"2c4d351ee4970a831a0cd93f0b3e88bf7a5a89bb","user":{"login":"cloudant","id":44642,"avatar_url":"https://avatars.githubusercontent.com/u/44642?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudant","html_url":"https://github.com/cloudant","followers_url":"https://api.github.com/users/cloudant/followers","following_url":"https://api.github.com/users/cloudant/following{/other_user}","gists_url":"https://api.github.com/users/cloudant/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudant/subscriptions","organizations_url":"https://api.github.com/users/cloudant/orgs","repos_url":"https://api.github.com/users/cloudant/repos","events_url":"https://api.github.com/users/cloudant/events{/privacy}","received_events_url":"https://api.github.com/users/cloudant/received_events","type":"Organization","site_admin":false},"repo":{"id":38246096,"name":"couchdb-couch-replicator","full_name":"cloudant/couchdb-couch-replicator","owner":{"login":"cloudant","id":44642,"avatar_url":"https://avatars.githubusercontent.com/u/44642?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudant","html_url":"https://github.com/cloudant","followers_url":"https://api.github.com/users/cloudant/followers","following_url":"https://api.github.com/users/cloudant/following{/other_user}","gists_url":"https://api.github.com/users/cloudant/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudant/subscriptions","organizations_url":"https://api.github.com/users/cloudant/orgs","repos_url":"https://api.github.com/users/cloudant/repos","events_url":"https://api.github.com/users/cloudant/events{/privacy}","received_events_url":"https://api.github.com/users/cloudant/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudant/couchdb-couch-replicator","description":"Mirror of Apache CouchDB","fork":true,"url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator","forks_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/forks","keys_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/teams","hooks_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/hooks","issue_events_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/issues/events{/number}","events_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/events","assignees_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/assignees{/user}","branches_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/branches{/branch}","tags_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/tags","blobs_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/languages","stargazers_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/stargazers","contributors_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/contributors","subscribers_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/subscribers","subscription_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/subscription","commits_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/contents/{+path}","compare_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/merges","archive_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/downloads","issues_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/issues{/number}","pulls_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/labels{/name}","releases_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/releases{/id}","deployments_url":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/deployments","created_at":"2015-06-29T12:19:20Z","updated_at":"2016-05-13T14:06:45Z","pushed_at":"2016-08-11T07:54:46Z","git_url":"git://github.com/cloudant/couchdb-couch-replicator.git","ssh_url":"git@github.com:cloudant/couchdb-couch-replicator.git","clone_url":"https://github.com/cloudant/couchdb-couch-replicator.git","svn_url":"https://github.com/cloudant/couchdb-couch-replicator","homepage":null,"size":4956,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/pulls/65"},"html":{"href":"https://github.com/cloudant/couchdb-couch-replicator/pull/65"},"issue":{"href":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/issues/65"},"comments":{"href":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/cloudant/couchdb-couch-replicator/statuses/4da223532fb222328c13c6c5d1797e17a6617978"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":11,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"nickva"}}