{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments/55094476","id":55094476,"diff_hunk":"@@ -94,27 +95,48 @@ public Row next() throws IOException {\n         if (result != null) {\n           lastRowKey = result.getKey();\n           rowCount++;\n-          // We've had at least one successful RPC, reset the backoff\n-          currentBackoff = null;\n+          // We've had at least one successful RPC, reset the backoffs\n+          currentErrorBackoff = null;\n+          currentTimeoutBackoff = null;\n         }\n \n         return result;\n       } catch (ScanTimeoutException rte) {\n-        logger.info(\"The client could not get a response in %d ms. Retrying the scan.\",\n-          retryOptions.getReadPartialRowTimeoutMillis());\n-        backOffAndRetry(rte);\n+        handleScanTimeout(rte);\n       } catch (IOExceptionWithStatus ioe) {\n-        Status.Code code = ioe.getStatus().getCode();\n-        if (retryOptions.isRetryable(code)) {\n-          logger.info(\"Reissuing scan after receiving error with status: %s.\", code.name());\n-          backOffAndRetry(ioe);\n-        } else {\n-          throw ioe;\n-        }\n+        handleIOException(ioe);\n       }\n     }\n   }\n \n+  private void handleScanTimeout(ScanTimeoutException rte) throws IOException {\n+    logger.info(\"The client could not get a response in %d ms. Retrying the scan.\",\n+      retryOptions.getReadPartialRowTimeoutMillis());\n+    if (currentTimeoutBackoff == null) {\n+      // Create a backoff that retries immediately, up to the max number of times\n+      currentTimeoutBackoff =\n+          new TimeoutRetryBackOff(retryOptions.getMaxScanTimeoutRetries(), BackOff.ZERO_BACKOFF);","path":"bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/scanner/ResumingStreamingResultScanner.java","position":46,"original_position":46,"commit_id":"ea5085acb78d30da4f4752fa6f7d8d8c38661574","original_commit_id":"ea5085acb78d30da4f4752fa6f7d8d8c38661574","user":{"login":"sduskis","id":99305,"avatar_url":"https://avatars.githubusercontent.com/u/99305?v=3","gravatar_id":"","url":"https://api.github.com/users/sduskis","html_url":"https://github.com/sduskis","followers_url":"https://api.github.com/users/sduskis/followers","following_url":"https://api.github.com/users/sduskis/following{/other_user}","gists_url":"https://api.github.com/users/sduskis/gists{/gist_id}","starred_url":"https://api.github.com/users/sduskis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sduskis/subscriptions","organizations_url":"https://api.github.com/users/sduskis/orgs","repos_url":"https://api.github.com/users/sduskis/repos","events_url":"https://api.github.com/users/sduskis/events{/privacy}","received_events_url":"https://api.github.com/users/sduskis/received_events","type":"User","site_admin":false},"body":"do we need a BackOff.ZERO_BACKOFF / delegate?","created_at":"2016-03-04T21:54:08Z","updated_at":"2016-03-04T21:54:08Z","html_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/713#discussion_r55094476","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/713","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments/55094476"},"html":{"href":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/713#discussion_r55094476"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/713"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/713","id":61776098,"html_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/713","diff_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/713.diff","patch_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/713.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/713","number":713,"state":"open","locked":false,"title":"Improve retry logic after scan timeouts.","user":{"login":"garye","id":37807,"avatar_url":"https://avatars.githubusercontent.com/u/37807?v=3","gravatar_id":"","url":"https://api.github.com/users/garye","html_url":"https://github.com/garye","followers_url":"https://api.github.com/users/garye/followers","following_url":"https://api.github.com/users/garye/following{/other_user}","gists_url":"https://api.github.com/users/garye/gists{/gist_id}","starred_url":"https://api.github.com/users/garye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garye/subscriptions","organizations_url":"https://api.github.com/users/garye/orgs","repos_url":"https://api.github.com/users/garye/repos","events_url":"https://api.github.com/users/garye/events{/privacy}","received_events_url":"https://api.github.com/users/garye/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-04T21:45:07Z","updated_at":"2016-03-04T21:54:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8b7c733642cb6a627f0d4c1f2382d01ec77900b","assignee":{"login":"sduskis","id":99305,"avatar_url":"https://avatars.githubusercontent.com/u/99305?v=3","gravatar_id":"","url":"https://api.github.com/users/sduskis","html_url":"https://github.com/sduskis","followers_url":"https://api.github.com/users/sduskis/followers","following_url":"https://api.github.com/users/sduskis/following{/other_user}","gists_url":"https://api.github.com/users/sduskis/gists{/gist_id}","starred_url":"https://api.github.com/users/sduskis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sduskis/subscriptions","organizations_url":"https://api.github.com/users/sduskis/orgs","repos_url":"https://api.github.com/users/sduskis/repos","events_url":"https://api.github.com/users/sduskis/events{/privacy}","received_events_url":"https://api.github.com/users/sduskis/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/713/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/713/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/713/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/statuses/ea5085acb78d30da4f4752fa6f7d8d8c38661574","head":{"label":"garye:scan_timeouts","ref":"scan_timeouts","sha":"ea5085acb78d30da4f4752fa6f7d8d8c38661574","user":{"login":"garye","id":37807,"avatar_url":"https://avatars.githubusercontent.com/u/37807?v=3","gravatar_id":"","url":"https://api.github.com/users/garye","html_url":"https://github.com/garye","followers_url":"https://api.github.com/users/garye/followers","following_url":"https://api.github.com/users/garye/following{/other_user}","gists_url":"https://api.github.com/users/garye/gists{/gist_id}","starred_url":"https://api.github.com/users/garye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garye/subscriptions","organizations_url":"https://api.github.com/users/garye/orgs","repos_url":"https://api.github.com/users/garye/repos","events_url":"https://api.github.com/users/garye/events{/privacy}","received_events_url":"https://api.github.com/users/garye/received_events","type":"User","site_admin":false},"repo":{"id":51475485,"name":"cloud-bigtable-client","full_name":"garye/cloud-bigtable-client","owner":{"login":"garye","id":37807,"avatar_url":"https://avatars.githubusercontent.com/u/37807?v=3","gravatar_id":"","url":"https://api.github.com/users/garye","html_url":"https://github.com/garye","followers_url":"https://api.github.com/users/garye/followers","following_url":"https://api.github.com/users/garye/following{/other_user}","gists_url":"https://api.github.com/users/garye/gists{/gist_id}","starred_url":"https://api.github.com/users/garye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garye/subscriptions","organizations_url":"https://api.github.com/users/garye/orgs","repos_url":"https://api.github.com/users/garye/repos","events_url":"https://api.github.com/users/garye/events{/privacy}","received_events_url":"https://api.github.com/users/garye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/garye/cloud-bigtable-client","description":"HBase client extension to access Google Cloud Bigtable","fork":true,"url":"https://api.github.com/repos/garye/cloud-bigtable-client","forks_url":"https://api.github.com/repos/garye/cloud-bigtable-client/forks","keys_url":"https://api.github.com/repos/garye/cloud-bigtable-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/garye/cloud-bigtable-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/garye/cloud-bigtable-client/teams","hooks_url":"https://api.github.com/repos/garye/cloud-bigtable-client/hooks","issue_events_url":"https://api.github.com/repos/garye/cloud-bigtable-client/issues/events{/number}","events_url":"https://api.github.com/repos/garye/cloud-bigtable-client/events","assignees_url":"https://api.github.com/repos/garye/cloud-bigtable-client/assignees{/user}","branches_url":"https://api.github.com/repos/garye/cloud-bigtable-client/branches{/branch}","tags_url":"https://api.github.com/repos/garye/cloud-bigtable-client/tags","blobs_url":"https://api.github.com/repos/garye/cloud-bigtable-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/garye/cloud-bigtable-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/garye/cloud-bigtable-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/garye/cloud-bigtable-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/garye/cloud-bigtable-client/statuses/{sha}","languages_url":"https://api.github.com/repos/garye/cloud-bigtable-client/languages","stargazers_url":"https://api.github.com/repos/garye/cloud-bigtable-client/stargazers","contributors_url":"https://api.github.com/repos/garye/cloud-bigtable-client/contributors","subscribers_url":"https://api.github.com/repos/garye/cloud-bigtable-client/subscribers","subscription_url":"https://api.github.com/repos/garye/cloud-bigtable-client/subscription","commits_url":"https://api.github.com/repos/garye/cloud-bigtable-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/garye/cloud-bigtable-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/garye/cloud-bigtable-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/garye/cloud-bigtable-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/garye/cloud-bigtable-client/contents/{+path}","compare_url":"https://api.github.com/repos/garye/cloud-bigtable-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/garye/cloud-bigtable-client/merges","archive_url":"https://api.github.com/repos/garye/cloud-bigtable-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/garye/cloud-bigtable-client/downloads","issues_url":"https://api.github.com/repos/garye/cloud-bigtable-client/issues{/number}","pulls_url":"https://api.github.com/repos/garye/cloud-bigtable-client/pulls{/number}","milestones_url":"https://api.github.com/repos/garye/cloud-bigtable-client/milestones{/number}","notifications_url":"https://api.github.com/repos/garye/cloud-bigtable-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/garye/cloud-bigtable-client/labels{/name}","releases_url":"https://api.github.com/repos/garye/cloud-bigtable-client/releases{/id}","deployments_url":"https://api.github.com/repos/garye/cloud-bigtable-client/deployments","created_at":"2016-02-10T21:57:12Z","updated_at":"2016-02-10T21:57:14Z","pushed_at":"2016-03-04T21:32:04Z","git_url":"git://github.com/garye/cloud-bigtable-client.git","ssh_url":"git@github.com:garye/cloud-bigtable-client.git","clone_url":"https://github.com/garye/cloud-bigtable-client.git","svn_url":"https://github.com/garye/cloud-bigtable-client","homepage":"","size":5235,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"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":"7d2f7503f39b1bcd676f6eb4d9fc835557cb6f7a","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":18442381,"name":"cloud-bigtable-client","full_name":"GoogleCloudPlatform/cloud-bigtable-client","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/cloud-bigtable-client","description":"HBase client extension to access Google Cloud Bigtable","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/deployments","created_at":"2014-04-04T14:54:35Z","updated_at":"2016-02-15T04:13:58Z","pushed_at":"2016-03-04T21:45:07Z","git_url":"git://github.com/GoogleCloudPlatform/cloud-bigtable-client.git","ssh_url":"git@github.com:GoogleCloudPlatform/cloud-bigtable-client.git","clone_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client.git","svn_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client","homepage":"","size":12114,"stargazers_count":43,"watchers_count":43,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":22,"forks":34,"open_issues":22,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/713"},"html":{"href":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/713"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/713"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/713/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/713/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/713/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/statuses/ea5085acb78d30da4f4752fa6f7d8d8c38661574"}}}}