{"action":"created","comment":{"url":"https://api.github.com/repos/palantir/atlasdb/pulls/comments/176756134","pull_request_review_id":106515567,"id":176756134,"diff_hunk":"@@ -20,41 +20,57 @@\n import java.nio.charset.StandardCharsets;\n import java.util.List;\n import java.util.Map;\n+import java.util.NoSuchElementException;\n+import java.util.Set;\n+import java.util.function.Supplier;\n \n import org.apache.cassandra.thrift.CASResult;\n import org.apache.cassandra.thrift.Cassandra;\n+import org.apache.cassandra.thrift.CfDef;\n import org.apache.cassandra.thrift.Column;\n import org.apache.cassandra.thrift.ColumnOrSuperColumn;\n import org.apache.cassandra.thrift.ColumnParent;\n import org.apache.cassandra.thrift.ColumnPath;\n import org.apache.cassandra.thrift.Compression;\n import org.apache.cassandra.thrift.ConsistencyLevel;\n+import org.apache.cassandra.thrift.CqlPreparedResult;\n import org.apache.cassandra.thrift.CqlResult;\n import org.apache.cassandra.thrift.InvalidRequestException;\n import org.apache.cassandra.thrift.KeyRange;\n import org.apache.cassandra.thrift.KeySlice;\n+import org.apache.cassandra.thrift.KsDef;\n import org.apache.cassandra.thrift.Mutation;\n import org.apache.cassandra.thrift.NotFoundException;\n import org.apache.cassandra.thrift.SchemaDisagreementException;\n import org.apache.cassandra.thrift.SlicePredicate;\n import org.apache.cassandra.thrift.TimedOutException;\n+import org.apache.cassandra.thrift.TokenRange;\n import org.apache.cassandra.thrift.UnavailableException;\n import org.apache.thrift.TException;\n+import org.apache.thrift.protocol.TProtocol;\n+import org.apache.thrift.protocol.TProtocolException;\n+import org.apache.thrift.transport.TTransportException;\n \n+import com.google.common.collect.ImmutableSet;\n import com.palantir.atlasdb.keyvalue.api.TableReference;\n import com.palantir.atlasdb.keyvalue.impl.AbstractKeyValueService;\n \n @SuppressWarnings({\"all\"}) // thrift variable names.\n public class CassandraClientImpl implements CassandraClient {\n     private final Cassandra.Client client;\n+    private boolean isValid;\n+\n+    private static final Set<Class> blackListedExceptions =","path":"atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/CassandraClientImpl.java","position":44,"original_position":44,"commit_id":"6c40732e398187ed658486ba15109dc8a83f556a","original_commit_id":"6c40732e398187ed658486ba15109dc8a83f556a","user":{"login":"gsheasby","id":15610492,"avatar_url":"https://avatars2.githubusercontent.com/u/15610492?v=4","gravatar_id":"","url":"https://api.github.com/users/gsheasby","html_url":"https://github.com/gsheasby","followers_url":"https://api.github.com/users/gsheasby/followers","following_url":"https://api.github.com/users/gsheasby/following{/other_user}","gists_url":"https://api.github.com/users/gsheasby/gists{/gist_id}","starred_url":"https://api.github.com/users/gsheasby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsheasby/subscriptions","organizations_url":"https://api.github.com/users/gsheasby/orgs","repos_url":"https://api.github.com/users/gsheasby/repos","events_url":"https://api.github.com/users/gsheasby/events{/privacy}","received_events_url":"https://api.github.com/users/gsheasby/received_events","type":"User","site_admin":false},"body":"style: `BLACKLISTED_EXCEPTIONS` (casing for constants, and blacklist is typically a single word). Did you run checkstyle?\r\n\r\nAgain, would be nice to write in a comment what it means for these exceptions to be blacklisted. Does it mean that we do consider the client invalid if this exception is hit, or that we don't?","created_at":"2018-03-23T14:40:42Z","updated_at":"2018-03-23T14:59:57Z","html_url":"https://github.com/palantir/atlasdb/pull/3063#discussion_r176756134","pull_request_url":"https://api.github.com/repos/palantir/atlasdb/pulls/3063","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/palantir/atlasdb/pulls/comments/176756134"},"html":{"href":"https://github.com/palantir/atlasdb/pull/3063#discussion_r176756134"},"pull_request":{"href":"https://api.github.com/repos/palantir/atlasdb/pulls/3063"}}},"pull_request":{"url":"https://api.github.com/repos/palantir/atlasdb/pulls/3063","id":175603825,"html_url":"https://github.com/palantir/atlasdb/pull/3063","diff_url":"https://github.com/palantir/atlasdb/pull/3063.diff","patch_url":"https://github.com/palantir/atlasdb/pull/3063.patch","issue_url":"https://api.github.com/repos/palantir/atlasdb/issues/3063","number":3063,"state":"open","locked":false,"title":"Go/cassandra client pool fix","user":{"login":"gokcanozakdag","id":9950842,"avatar_url":"https://avatars2.githubusercontent.com/u/9950842?v=4","gravatar_id":"","url":"https://api.github.com/users/gokcanozakdag","html_url":"https://github.com/gokcanozakdag","followers_url":"https://api.github.com/users/gokcanozakdag/followers","following_url":"https://api.github.com/users/gokcanozakdag/following{/other_user}","gists_url":"https://api.github.com/users/gokcanozakdag/gists{/gist_id}","starred_url":"https://api.github.com/users/gokcanozakdag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gokcanozakdag/subscriptions","organizations_url":"https://api.github.com/users/gokcanozakdag/orgs","repos_url":"https://api.github.com/users/gokcanozakdag/repos","events_url":"https://api.github.com/users/gokcanozakdag/events{/privacy}","received_events_url":"https://api.github.com/users/gokcanozakdag/received_events","type":"User","site_admin":false},"body":"**Goals (and why)**:\r\nAdressing the issue: https://github.com/palantir/atlasdb/issues/2973\r\n**Implementation Description (bullets)**:\r\n`CassandraClient.rawClient()` method is removed, and all the methods used from `rawClient` is wrapped in `CassandraClient`. `CassandraClient` alters the state of `isValid` if a blacklisted exception is thrown by any method calls. \r\n**Concerns (what feedback would you like?)**:\r\n\r\n**Where should we start reviewing?**:\r\n`CassandraClient` may be the right place to start.\r\n**Priority (whenever / two weeks / yesterday)**:\r\n\r\n<!---\r\nPlease remember to:\r\n- Add any necessary release notes (including breaking changes)\r\n- Make sure the documentation is up to date for your change\r\n--->\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/palantir/atlasdb/3063)\r\n<!-- Reviewable:end -->\r\n","created_at":"2018-03-16T17:50:26Z","updated_at":"2018-03-23T14:59:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"844008873db19238a1ff937ecf5749bf251aa475","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sandorw","id":8271534,"avatar_url":"https://avatars1.githubusercontent.com/u/8271534?v=4","gravatar_id":"","url":"https://api.github.com/users/sandorw","html_url":"https://github.com/sandorw","followers_url":"https://api.github.com/users/sandorw/followers","following_url":"https://api.github.com/users/sandorw/following{/other_user}","gists_url":"https://api.github.com/users/sandorw/gists{/gist_id}","starred_url":"https://api.github.com/users/sandorw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandorw/subscriptions","organizations_url":"https://api.github.com/users/sandorw/orgs","repos_url":"https://api.github.com/users/sandorw/repos","events_url":"https://api.github.com/users/sandorw/events{/privacy}","received_events_url":"https://api.github.com/users/sandorw/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/palantir/atlasdb/pulls/3063/commits","review_comments_url":"https://api.github.com/repos/palantir/atlasdb/pulls/3063/comments","review_comment_url":"https://api.github.com/repos/palantir/atlasdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/palantir/atlasdb/issues/3063/comments","statuses_url":"https://api.github.com/repos/palantir/atlasdb/statuses/6c40732e398187ed658486ba15109dc8a83f556a","head":{"label":"palantir:go/cassandra-client-pool-fix","ref":"go/cassandra-client-pool-fix","sha":"6c40732e398187ed658486ba15109dc8a83f556a","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars0.githubusercontent.com/u/303157?v=4","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":36960637,"name":"atlasdb","full_name":"palantir/atlasdb","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars0.githubusercontent.com/u/303157?v=4","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/atlasdb","description":"Transactional Distributed Database Layer","fork":false,"url":"https://api.github.com/repos/palantir/atlasdb","forks_url":"https://api.github.com/repos/palantir/atlasdb/forks","keys_url":"https://api.github.com/repos/palantir/atlasdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/atlasdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/atlasdb/teams","hooks_url":"https://api.github.com/repos/palantir/atlasdb/hooks","issue_events_url":"https://api.github.com/repos/palantir/atlasdb/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/atlasdb/events","assignees_url":"https://api.github.com/repos/palantir/atlasdb/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/atlasdb/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/atlasdb/tags","blobs_url":"https://api.github.com/repos/palantir/atlasdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/atlasdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/atlasdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/atlasdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/atlasdb/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/atlasdb/languages","stargazers_url":"https://api.github.com/repos/palantir/atlasdb/stargazers","contributors_url":"https://api.github.com/repos/palantir/atlasdb/contributors","subscribers_url":"https://api.github.com/repos/palantir/atlasdb/subscribers","subscription_url":"https://api.github.com/repos/palantir/atlasdb/subscription","commits_url":"https://api.github.com/repos/palantir/atlasdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/atlasdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/atlasdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/atlasdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/atlasdb/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/atlasdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/atlasdb/merges","archive_url":"https://api.github.com/repos/palantir/atlasdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/atlasdb/downloads","issues_url":"https://api.github.com/repos/palantir/atlasdb/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/atlasdb/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/atlasdb/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/atlasdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/atlasdb/labels{/name}","releases_url":"https://api.github.com/repos/palantir/atlasdb/releases{/id}","deployments_url":"https://api.github.com/repos/palantir/atlasdb/deployments","created_at":"2015-06-05T23:42:44Z","updated_at":"2018-03-22T15:06:10Z","pushed_at":"2018-03-23T11:00:22Z","git_url":"git://github.com/palantir/atlasdb.git","ssh_url":"git@github.com:palantir/atlasdb.git","clone_url":"https://github.com/palantir/atlasdb.git","svn_url":"https://github.com/palantir/atlasdb","homepage":"http://palantir.github.io/atlasdb/","size":58890,"stargazers_count":573,"watchers_count":573,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":106,"mirror_url":null,"archived":false,"open_issues_count":285,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":106,"open_issues":285,"watchers":573,"default_branch":"develop"}},"base":{"label":"palantir:develop","ref":"develop","sha":"b02afda0a62f5f5d2c9f776a1e1f60a652cb193c","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars0.githubusercontent.com/u/303157?v=4","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":36960637,"name":"atlasdb","full_name":"palantir/atlasdb","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars0.githubusercontent.com/u/303157?v=4","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/atlasdb","description":"Transactional Distributed Database Layer","fork":false,"url":"https://api.github.com/repos/palantir/atlasdb","forks_url":"https://api.github.com/repos/palantir/atlasdb/forks","keys_url":"https://api.github.com/repos/palantir/atlasdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/atlasdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/atlasdb/teams","hooks_url":"https://api.github.com/repos/palantir/atlasdb/hooks","issue_events_url":"https://api.github.com/repos/palantir/atlasdb/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/atlasdb/events","assignees_url":"https://api.github.com/repos/palantir/atlasdb/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/atlasdb/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/atlasdb/tags","blobs_url":"https://api.github.com/repos/palantir/atlasdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/atlasdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/atlasdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/atlasdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/atlasdb/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/atlasdb/languages","stargazers_url":"https://api.github.com/repos/palantir/atlasdb/stargazers","contributors_url":"https://api.github.com/repos/palantir/atlasdb/contributors","subscribers_url":"https://api.github.com/repos/palantir/atlasdb/subscribers","subscription_url":"https://api.github.com/repos/palantir/atlasdb/subscription","commits_url":"https://api.github.com/repos/palantir/atlasdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/atlasdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/atlasdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/atlasdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/atlasdb/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/atlasdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/atlasdb/merges","archive_url":"https://api.github.com/repos/palantir/atlasdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/atlasdb/downloads","issues_url":"https://api.github.com/repos/palantir/atlasdb/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/atlasdb/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/atlasdb/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/atlasdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/atlasdb/labels{/name}","releases_url":"https://api.github.com/repos/palantir/atlasdb/releases{/id}","deployments_url":"https://api.github.com/repos/palantir/atlasdb/deployments","created_at":"2015-06-05T23:42:44Z","updated_at":"2018-03-22T15:06:10Z","pushed_at":"2018-03-23T11:00:22Z","git_url":"git://github.com/palantir/atlasdb.git","ssh_url":"git@github.com:palantir/atlasdb.git","clone_url":"https://github.com/palantir/atlasdb.git","svn_url":"https://github.com/palantir/atlasdb","homepage":"http://palantir.github.io/atlasdb/","size":58890,"stargazers_count":573,"watchers_count":573,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":106,"mirror_url":null,"archived":false,"open_issues_count":285,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":106,"open_issues":285,"watchers":573,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/atlasdb/pulls/3063"},"html":{"href":"https://github.com/palantir/atlasdb/pull/3063"},"issue":{"href":"https://api.github.com/repos/palantir/atlasdb/issues/3063"},"comments":{"href":"https://api.github.com/repos/palantir/atlasdb/issues/3063/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/atlasdb/pulls/3063/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/atlasdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/palantir/atlasdb/pulls/3063/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/atlasdb/statuses/6c40732e398187ed658486ba15109dc8a83f556a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gsheasby"}}