{"action":"created","comment":{"url":"https://api.github.com/repos/HubSpot/Baragon/pulls/comments/41559480","id":41559480,"diff_hunk":"@@ -190,6 +189,8 @@ public void run() {\n           }\n         }\n       }\n+\n+      requestManager.failStuckPendingRequests();","path":"BaragonService/src/main/java/com/hubspot/baragon/service/worker/BaragonRequestWorker.java","position":13,"original_position":13,"commit_id":"36ff2fdf979e8eda774c473bea8c1aa1854b6f7b","original_commit_id":"36ff2fdf979e8eda774c473bea8c1aa1854b6f7b","user":{"login":"tpetr","id":47152,"avatar_url":"https://avatars.githubusercontent.com/u/47152?v=3","gravatar_id":"","url":"https://api.github.com/users/tpetr","html_url":"https://github.com/tpetr","followers_url":"https://api.github.com/users/tpetr/followers","following_url":"https://api.github.com/users/tpetr/following{/other_user}","gists_url":"https://api.github.com/users/tpetr/gists{/gist_id}","starred_url":"https://api.github.com/users/tpetr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpetr/subscriptions","organizations_url":"https://api.github.com/users/tpetr/orgs","repos_url":"https://api.github.com/users/tpetr/repos","events_url":"https://api.github.com/users/tpetr/events{/privacy}","received_events_url":"https://api.github.com/users/tpetr/received_events","type":"User","site_admin":false},"body":"i'm flip-flopping on whether or not we want this check to occur every time the request worker is triggered -- could be expensive for people who haven't enabled purging yet. Could we move this into one of the other background workers? Or investigate doing all the request creation stuff as part of a ZK transaction?","created_at":"2015-10-08T19:48:44Z","updated_at":"2015-10-08T19:48:44Z","html_url":"https://github.com/HubSpot/Baragon/pull/112#discussion_r41559480","pull_request_url":"https://api.github.com/repos/HubSpot/Baragon/pulls/112","_links":{"self":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/comments/41559480"},"html":{"href":"https://github.com/HubSpot/Baragon/pull/112#discussion_r41559480"},"pull_request":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/112"}}},"pull_request":{"url":"https://api.github.com/repos/HubSpot/Baragon/pulls/112","id":46666228,"html_url":"https://github.com/HubSpot/Baragon/pull/112","diff_url":"https://github.com/HubSpot/Baragon/pull/112.diff","patch_url":"https://github.com/HubSpot/Baragon/pull/112.patch","issue_url":"https://api.github.com/repos/HubSpot/Baragon/issues/112","number":112,"state":"open","locked":false,"title":"remove stuck pending requests from the queue","user":{"login":"ssalinas","id":6034439,"avatar_url":"https://avatars.githubusercontent.com/u/6034439?v=3","gravatar_id":"","url":"https://api.github.com/users/ssalinas","html_url":"https://github.com/ssalinas","followers_url":"https://api.github.com/users/ssalinas/followers","following_url":"https://api.github.com/users/ssalinas/following{/other_user}","gists_url":"https://api.github.com/users/ssalinas/gists{/gist_id}","starred_url":"https://api.github.com/users/ssalinas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssalinas/subscriptions","organizations_url":"https://api.github.com/users/ssalinas/orgs","repos_url":"https://api.github.com/users/ssalinas/repos","events_url":"https://api.github.com/users/ssalinas/events{/privacy}","received_events_url":"https://api.github.com/users/ssalinas/received_events","type":"User","site_admin":false},"body":"We saw that when zk connection was lost during the enqueue, with just the right timing we could write request data without enqueuing it. So the response will be present, but always in a waiting status. This will check for any pending requests that might have gotten stuck and put them back in the queue.\r\n\r\n@tpetr was going back and forth between putting them back in the queue and deleting them. Either one will help Singularity and Baragon get unstuck (either proceeding forward or making as failed). Reasoning for deleting would be because we don't know where exactly an issue might have happened/hard to tell what kind of state we are really in","created_at":"2015-10-02T18:25:18Z","updated_at":"2015-10-08T19:48:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d64e9f772c5bcbf87561607f9bb3e72cf8c470b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HubSpot/Baragon/pulls/112/commits","review_comments_url":"https://api.github.com/repos/HubSpot/Baragon/pulls/112/comments","review_comment_url":"https://api.github.com/repos/HubSpot/Baragon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HubSpot/Baragon/issues/112/comments","statuses_url":"https://api.github.com/repos/HubSpot/Baragon/statuses/36ff2fdf979e8eda774c473bea8c1aa1854b6f7b","head":{"label":"HubSpot:pending","ref":"pending","sha":"36ff2fdf979e8eda774c473bea8c1aa1854b6f7b","user":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars.githubusercontent.com/u/326419?v=3","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"repo":{"id":14145875,"name":"Baragon","full_name":"HubSpot/Baragon","owner":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars.githubusercontent.com/u/326419?v=3","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HubSpot/Baragon","description":"Load balancer API","fork":false,"url":"https://api.github.com/repos/HubSpot/Baragon","forks_url":"https://api.github.com/repos/HubSpot/Baragon/forks","keys_url":"https://api.github.com/repos/HubSpot/Baragon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HubSpot/Baragon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HubSpot/Baragon/teams","hooks_url":"https://api.github.com/repos/HubSpot/Baragon/hooks","issue_events_url":"https://api.github.com/repos/HubSpot/Baragon/issues/events{/number}","events_url":"https://api.github.com/repos/HubSpot/Baragon/events","assignees_url":"https://api.github.com/repos/HubSpot/Baragon/assignees{/user}","branches_url":"https://api.github.com/repos/HubSpot/Baragon/branches{/branch}","tags_url":"https://api.github.com/repos/HubSpot/Baragon/tags","blobs_url":"https://api.github.com/repos/HubSpot/Baragon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HubSpot/Baragon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HubSpot/Baragon/git/refs{/sha}","trees_url":"https://api.github.com/repos/HubSpot/Baragon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HubSpot/Baragon/statuses/{sha}","languages_url":"https://api.github.com/repos/HubSpot/Baragon/languages","stargazers_url":"https://api.github.com/repos/HubSpot/Baragon/stargazers","contributors_url":"https://api.github.com/repos/HubSpot/Baragon/contributors","subscribers_url":"https://api.github.com/repos/HubSpot/Baragon/subscribers","subscription_url":"https://api.github.com/repos/HubSpot/Baragon/subscription","commits_url":"https://api.github.com/repos/HubSpot/Baragon/commits{/sha}","git_commits_url":"https://api.github.com/repos/HubSpot/Baragon/git/commits{/sha}","comments_url":"https://api.github.com/repos/HubSpot/Baragon/comments{/number}","issue_comment_url":"https://api.github.com/repos/HubSpot/Baragon/issues/comments{/number}","contents_url":"https://api.github.com/repos/HubSpot/Baragon/contents/{+path}","compare_url":"https://api.github.com/repos/HubSpot/Baragon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HubSpot/Baragon/merges","archive_url":"https://api.github.com/repos/HubSpot/Baragon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HubSpot/Baragon/downloads","issues_url":"https://api.github.com/repos/HubSpot/Baragon/issues{/number}","pulls_url":"https://api.github.com/repos/HubSpot/Baragon/pulls{/number}","milestones_url":"https://api.github.com/repos/HubSpot/Baragon/milestones{/number}","notifications_url":"https://api.github.com/repos/HubSpot/Baragon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HubSpot/Baragon/labels{/name}","releases_url":"https://api.github.com/repos/HubSpot/Baragon/releases{/id}","created_at":"2013-11-05T15:51:09Z","updated_at":"2015-10-01T20:48:04Z","pushed_at":"2015-10-08T16:43:43Z","git_url":"git://github.com/HubSpot/Baragon.git","ssh_url":"git@github.com:HubSpot/Baragon.git","clone_url":"https://github.com/HubSpot/Baragon.git","svn_url":"https://github.com/HubSpot/Baragon","homepage":null,"size":9369,"stargazers_count":40,"watchers_count":40,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":5,"forks":7,"open_issues":5,"watchers":40,"default_branch":"master"}},"base":{"label":"HubSpot:master","ref":"master","sha":"0a9e532be7b3c0d06b1beaf2253a02c942de926f","user":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars.githubusercontent.com/u/326419?v=3","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"repo":{"id":14145875,"name":"Baragon","full_name":"HubSpot/Baragon","owner":{"login":"HubSpot","id":326419,"avatar_url":"https://avatars.githubusercontent.com/u/326419?v=3","gravatar_id":"","url":"https://api.github.com/users/HubSpot","html_url":"https://github.com/HubSpot","followers_url":"https://api.github.com/users/HubSpot/followers","following_url":"https://api.github.com/users/HubSpot/following{/other_user}","gists_url":"https://api.github.com/users/HubSpot/gists{/gist_id}","starred_url":"https://api.github.com/users/HubSpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubSpot/subscriptions","organizations_url":"https://api.github.com/users/HubSpot/orgs","repos_url":"https://api.github.com/users/HubSpot/repos","events_url":"https://api.github.com/users/HubSpot/events{/privacy}","received_events_url":"https://api.github.com/users/HubSpot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HubSpot/Baragon","description":"Load balancer API","fork":false,"url":"https://api.github.com/repos/HubSpot/Baragon","forks_url":"https://api.github.com/repos/HubSpot/Baragon/forks","keys_url":"https://api.github.com/repos/HubSpot/Baragon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HubSpot/Baragon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HubSpot/Baragon/teams","hooks_url":"https://api.github.com/repos/HubSpot/Baragon/hooks","issue_events_url":"https://api.github.com/repos/HubSpot/Baragon/issues/events{/number}","events_url":"https://api.github.com/repos/HubSpot/Baragon/events","assignees_url":"https://api.github.com/repos/HubSpot/Baragon/assignees{/user}","branches_url":"https://api.github.com/repos/HubSpot/Baragon/branches{/branch}","tags_url":"https://api.github.com/repos/HubSpot/Baragon/tags","blobs_url":"https://api.github.com/repos/HubSpot/Baragon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HubSpot/Baragon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HubSpot/Baragon/git/refs{/sha}","trees_url":"https://api.github.com/repos/HubSpot/Baragon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HubSpot/Baragon/statuses/{sha}","languages_url":"https://api.github.com/repos/HubSpot/Baragon/languages","stargazers_url":"https://api.github.com/repos/HubSpot/Baragon/stargazers","contributors_url":"https://api.github.com/repos/HubSpot/Baragon/contributors","subscribers_url":"https://api.github.com/repos/HubSpot/Baragon/subscribers","subscription_url":"https://api.github.com/repos/HubSpot/Baragon/subscription","commits_url":"https://api.github.com/repos/HubSpot/Baragon/commits{/sha}","git_commits_url":"https://api.github.com/repos/HubSpot/Baragon/git/commits{/sha}","comments_url":"https://api.github.com/repos/HubSpot/Baragon/comments{/number}","issue_comment_url":"https://api.github.com/repos/HubSpot/Baragon/issues/comments{/number}","contents_url":"https://api.github.com/repos/HubSpot/Baragon/contents/{+path}","compare_url":"https://api.github.com/repos/HubSpot/Baragon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HubSpot/Baragon/merges","archive_url":"https://api.github.com/repos/HubSpot/Baragon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HubSpot/Baragon/downloads","issues_url":"https://api.github.com/repos/HubSpot/Baragon/issues{/number}","pulls_url":"https://api.github.com/repos/HubSpot/Baragon/pulls{/number}","milestones_url":"https://api.github.com/repos/HubSpot/Baragon/milestones{/number}","notifications_url":"https://api.github.com/repos/HubSpot/Baragon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HubSpot/Baragon/labels{/name}","releases_url":"https://api.github.com/repos/HubSpot/Baragon/releases{/id}","created_at":"2013-11-05T15:51:09Z","updated_at":"2015-10-01T20:48:04Z","pushed_at":"2015-10-08T16:43:43Z","git_url":"git://github.com/HubSpot/Baragon.git","ssh_url":"git@github.com:HubSpot/Baragon.git","clone_url":"https://github.com/HubSpot/Baragon.git","svn_url":"https://github.com/HubSpot/Baragon","homepage":null,"size":9369,"stargazers_count":40,"watchers_count":40,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":5,"forks":7,"open_issues":5,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/112"},"html":{"href":"https://github.com/HubSpot/Baragon/pull/112"},"issue":{"href":"https://api.github.com/repos/HubSpot/Baragon/issues/112"},"comments":{"href":"https://api.github.com/repos/HubSpot/Baragon/issues/112/comments"},"review_comments":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/112/comments"},"review_comment":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HubSpot/Baragon/pulls/112/commits"},"statuses":{"href":"https://api.github.com/repos/HubSpot/Baragon/statuses/36ff2fdf979e8eda774c473bea8c1aa1854b6f7b"}}}}