{"action":"created","comment":{"url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/comments/71122894","id":71122894,"diff_hunk":"@@ -114,6 +149,20 @@ public void reconnectFailedConnection(SearchFilter searchFilter) throws QueryExc\n \n         resetOldsBlackListHosts();\n \n+        // Initial connection to cluster - retrieve endpoints immediately\n+        if (searchFilter.isInitialConnection() && urlParser.getHostAddresses().size() == 1 && getClusterHostAddress() != null) {\n+            AuroraProtocol tempProtocol = AuroraProtocol.getNewProtocol(getProxy(), getUrlParser());\n+            tempProtocol.setHostAddress(getClusterHostAddress());\n+            try {\n+                tempProtocol.connect();\n+                retrieveAllEndpointsAndSet(tempProtocol);\n+            } catch (QueryException e) {","path":"src/main/java/org/mariadb/jdbc/internal/failover/impl/AuroraListener.java","position":83,"original_position":76,"commit_id":"cea40ac50b68b684fbe5b7db5a0704ada241e38c","original_commit_id":"a461945b3b4744eda1b532d95be5ab8d8c1254c7","user":{"login":"rusher","id":618074,"avatar_url":"https://avatars.githubusercontent.com/u/618074?v=3","gravatar_id":"","url":"https://api.github.com/users/rusher","html_url":"https://github.com/rusher","followers_url":"https://api.github.com/users/rusher/followers","following_url":"https://api.github.com/users/rusher/following{/other_user}","gists_url":"https://api.github.com/users/rusher/gists{/gist_id}","starred_url":"https://api.github.com/users/rusher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rusher/subscriptions","organizations_url":"https://api.github.com/users/rusher/orgs","repos_url":"https://api.github.com/users/rusher/repos","events_url":"https://api.github.com/users/rusher/events{/privacy}","received_events_url":"https://api.github.com/users/rusher/received_events","type":"User","site_admin":false},"body":"I understand this logic, but why would we not use this fresh socket, and prefer to wait 1-2 seconds more to create a new connection ? this socket can be use directly. The only difference is that  cluster host can be blacklisted, but since blacklist is only a \"connecting order preference\" (i.e. driver connect hosts not in blacklist first, and use blacklist after).\r\n\r\n","created_at":"2016-07-18T09:54:29Z","updated_at":"2016-07-18T09:54:29Z","html_url":"https://github.com/MariaDB/mariadb-connector-j/pull/86#discussion_r71122894","pull_request_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/86","_links":{"self":{"href":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/comments/71122894"},"html":{"href":"https://github.com/MariaDB/mariadb-connector-j/pull/86#discussion_r71122894"},"pull_request":{"href":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/86","id":76669641,"html_url":"https://github.com/MariaDB/mariadb-connector-j/pull/86","diff_url":"https://github.com/MariaDB/mariadb-connector-j/pull/86.diff","patch_url":"https://github.com/MariaDB/mariadb-connector-j/pull/86.patch","issue_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/issues/86","number":86,"state":"open","locked":false,"title":"Auto-Discovery Feature for Aurora","user":{"login":"catherinep003","id":7293475,"avatar_url":"https://avatars.githubusercontent.com/u/7293475?v=3","gravatar_id":"","url":"https://api.github.com/users/catherinep003","html_url":"https://github.com/catherinep003","followers_url":"https://api.github.com/users/catherinep003/followers","following_url":"https://api.github.com/users/catherinep003/following{/other_user}","gists_url":"https://api.github.com/users/catherinep003/gists{/gist_id}","starred_url":"https://api.github.com/users/catherinep003/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catherinep003/subscriptions","organizations_url":"https://api.github.com/users/catherinep003/orgs","repos_url":"https://api.github.com/users/catherinep003/repos","events_url":"https://api.github.com/users/catherinep003/events{/privacy}","received_events_url":"https://api.github.com/users/catherinep003/received_events","type":"User","site_admin":false},"body":"The auto-discovery feature allows users to only have to write the cluster endpoint in their URL and the driver looks for the instance endpoints by itself. Whenever the driver reconnects, such as when a failover occurs, the driver will look for new instances and will remove any unavailable instances. In order to avoid confusion from the users, only the cluster endpoint is accepted in the URL for Aurora. \r\n\r\nTests were added to verify the functionality of the new feature. \r\n\r\nSome code simplification and typo corrections were done as well.","created_at":"2016-07-07T21:37:38Z","updated_at":"2016-07-18T09:54:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49a48c296f44fef371da1c73df0f61e744542992","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/86/commits","review_comments_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/86/comments","review_comment_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/issues/86/comments","statuses_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/statuses/cea40ac50b68b684fbe5b7db5a0704ada241e38c","head":{"label":"catherinep003:self-discovery","ref":"self-discovery","sha":"cea40ac50b68b684fbe5b7db5a0704ada241e38c","user":{"login":"catherinep003","id":7293475,"avatar_url":"https://avatars.githubusercontent.com/u/7293475?v=3","gravatar_id":"","url":"https://api.github.com/users/catherinep003","html_url":"https://github.com/catherinep003","followers_url":"https://api.github.com/users/catherinep003/followers","following_url":"https://api.github.com/users/catherinep003/following{/other_user}","gists_url":"https://api.github.com/users/catherinep003/gists{/gist_id}","starred_url":"https://api.github.com/users/catherinep003/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catherinep003/subscriptions","organizations_url":"https://api.github.com/users/catherinep003/orgs","repos_url":"https://api.github.com/users/catherinep003/repos","events_url":"https://api.github.com/users/catherinep003/events{/privacy}","received_events_url":"https://api.github.com/users/catherinep003/received_events","type":"User","site_admin":false},"repo":{"id":61818714,"name":"mariadb-connector-j","full_name":"catherinep003/mariadb-connector-j","owner":{"login":"catherinep003","id":7293475,"avatar_url":"https://avatars.githubusercontent.com/u/7293475?v=3","gravatar_id":"","url":"https://api.github.com/users/catherinep003","html_url":"https://github.com/catherinep003","followers_url":"https://api.github.com/users/catherinep003/followers","following_url":"https://api.github.com/users/catherinep003/following{/other_user}","gists_url":"https://api.github.com/users/catherinep003/gists{/gist_id}","starred_url":"https://api.github.com/users/catherinep003/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catherinep003/subscriptions","organizations_url":"https://api.github.com/users/catherinep003/orgs","repos_url":"https://api.github.com/users/catherinep003/repos","events_url":"https://api.github.com/users/catherinep003/events{/privacy}","received_events_url":"https://api.github.com/users/catherinep003/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/catherinep003/mariadb-connector-j","description":"MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. MariaDB Connector/J is LGPL licensed.","fork":true,"url":"https://api.github.com/repos/catherinep003/mariadb-connector-j","forks_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/forks","keys_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/teams","hooks_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/hooks","issue_events_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/issues/events{/number}","events_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/events","assignees_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/assignees{/user}","branches_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/branches{/branch}","tags_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/tags","blobs_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/git/refs{/sha}","trees_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/statuses/{sha}","languages_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/languages","stargazers_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/stargazers","contributors_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/contributors","subscribers_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/subscribers","subscription_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/subscription","commits_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/commits{/sha}","git_commits_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/git/commits{/sha}","comments_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/comments{/number}","issue_comment_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/issues/comments{/number}","contents_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/contents/{+path}","compare_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/merges","archive_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/downloads","issues_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/issues{/number}","pulls_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/pulls{/number}","milestones_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/milestones{/number}","notifications_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/labels{/name}","releases_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/releases{/id}","deployments_url":"https://api.github.com/repos/catherinep003/mariadb-connector-j/deployments","created_at":"2016-06-23T16:06:56Z","updated_at":"2016-06-23T16:06:58Z","pushed_at":"2016-07-15T15:27:58Z","git_url":"git://github.com/catherinep003/mariadb-connector-j.git","ssh_url":"git@github.com:catherinep003/mariadb-connector-j.git","clone_url":"https://github.com/catherinep003/mariadb-connector-j.git","svn_url":"https://github.com/catherinep003/mariadb-connector-j","homepage":null,"size":4994,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"MariaDB:master","ref":"master","sha":"89657fcb71e399da4510bd3f21f4a133795f5aea","user":{"login":"MariaDB","id":4739304,"avatar_url":"https://avatars.githubusercontent.com/u/4739304?v=3","gravatar_id":"","url":"https://api.github.com/users/MariaDB","html_url":"https://github.com/MariaDB","followers_url":"https://api.github.com/users/MariaDB/followers","following_url":"https://api.github.com/users/MariaDB/following{/other_user}","gists_url":"https://api.github.com/users/MariaDB/gists{/gist_id}","starred_url":"https://api.github.com/users/MariaDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MariaDB/subscriptions","organizations_url":"https://api.github.com/users/MariaDB/orgs","repos_url":"https://api.github.com/users/MariaDB/repos","events_url":"https://api.github.com/users/MariaDB/events{/privacy}","received_events_url":"https://api.github.com/users/MariaDB/received_events","type":"Organization","site_admin":false},"repo":{"id":30072532,"name":"mariadb-connector-j","full_name":"MariaDB/mariadb-connector-j","owner":{"login":"MariaDB","id":4739304,"avatar_url":"https://avatars.githubusercontent.com/u/4739304?v=3","gravatar_id":"","url":"https://api.github.com/users/MariaDB","html_url":"https://github.com/MariaDB","followers_url":"https://api.github.com/users/MariaDB/followers","following_url":"https://api.github.com/users/MariaDB/following{/other_user}","gists_url":"https://api.github.com/users/MariaDB/gists{/gist_id}","starred_url":"https://api.github.com/users/MariaDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MariaDB/subscriptions","organizations_url":"https://api.github.com/users/MariaDB/orgs","repos_url":"https://api.github.com/users/MariaDB/repos","events_url":"https://api.github.com/users/MariaDB/events{/privacy}","received_events_url":"https://api.github.com/users/MariaDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MariaDB/mariadb-connector-j","description":"MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. MariaDB Connector/J is LGPL licensed.","fork":false,"url":"https://api.github.com/repos/MariaDB/mariadb-connector-j","forks_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/forks","keys_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/teams","hooks_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/hooks","issue_events_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/issues/events{/number}","events_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/events","assignees_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/assignees{/user}","branches_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/branches{/branch}","tags_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/tags","blobs_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/git/refs{/sha}","trees_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/statuses/{sha}","languages_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/languages","stargazers_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/stargazers","contributors_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/contributors","subscribers_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/subscribers","subscription_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/subscription","commits_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/commits{/sha}","git_commits_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/git/commits{/sha}","comments_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/comments{/number}","issue_comment_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/issues/comments{/number}","contents_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/contents/{+path}","compare_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/merges","archive_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/downloads","issues_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/issues{/number}","pulls_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls{/number}","milestones_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/milestones{/number}","notifications_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/labels{/name}","releases_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/releases{/id}","deployments_url":"https://api.github.com/repos/MariaDB/mariadb-connector-j/deployments","created_at":"2015-01-30T13:12:38Z","updated_at":"2016-07-15T20:20:26Z","pushed_at":"2016-07-15T15:27:59Z","git_url":"git://github.com/MariaDB/mariadb-connector-j.git","ssh_url":"git@github.com:MariaDB/mariadb-connector-j.git","clone_url":"https://github.com/MariaDB/mariadb-connector-j.git","svn_url":"https://github.com/MariaDB/mariadb-connector-j","homepage":null,"size":6109,"stargazers_count":57,"watchers_count":57,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":3,"forks":44,"open_issues":3,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/86"},"html":{"href":"https://github.com/MariaDB/mariadb-connector-j/pull/86"},"issue":{"href":"https://api.github.com/repos/MariaDB/mariadb-connector-j/issues/86"},"comments":{"href":"https://api.github.com/repos/MariaDB/mariadb-connector-j/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MariaDB/mariadb-connector-j/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/MariaDB/mariadb-connector-j/statuses/cea40ac50b68b684fbe5b7db5a0704ada241e38c"}}}}
{"actor":{"display_login":"rusher"}}