-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#9600] YSQL SMARTDRIVER: Incorrect host value being return in Kubern…
…etes environment Summary: The value of the 'host' column in the result of //yb_servers// function in Kubernetes environment is incorrect when server_broadcast address is also set for tservers. The value in 'host' should be exactly same as what the 'preferred_ip' shows while querying "system.peers" ycql table. This value is correct when server broadcast address is not passed in the startup argument. But when that is passed then this starts showing the value of what was passed for server broadcast address instead. Additionally, this change also addresses some code review comments which on git commit: 6df6555 as pointed by @d-uspenskiy - Use iterator on the returned server list instead of using 'at' to avoid throwing exception - Refactor the code to move the pgalloc function call out from PgSession to pggate layer to avoid tight coupling of pg layer and the ybase layer. - Proper return value checks at a couple of places. - This also includes a change from @d-uspenskiy to make compiler warn about return value not being handled from function returning 'Status' Test Plan: Tested with the unit test TestLoadBalance, manual testing and demo sample apps in jdbc-yugabtedb repository. Reviewers: dmitry Reviewed By: dmitry Subscribers: dmitry, mihnea, zyu, yql Differential Revision: https://phabricator.dev.yugabyte.com/D12494
- Loading branch information
Showing
13 changed files
with
57 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters