Skip to content

refactor: Load connection info asynchronously. #426

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hessjcg
Copy link
Collaborator

@hessjcg hessjcg commented Mar 6, 2025

The Mysql and Postgres drivers require that their options.stream function immediately return a socket.
This refactors the connector so that it can return a SocketWrapper immediately, then delay the
connection of that socket until the asynchronous refresh operation finishes.

This will improve startup time for applications. This enable customers to use the standard host configuration
property instead of the Cloud SQL property "instance connection name". This will enable us to build lazy refresh
for the NodeJS connector.

@hessjcg hessjcg force-pushed the gh-421-use-driver-hostname branch 3 times, most recently from 756561c to fbb47da Compare March 6, 2025 17:01
@hessjcg hessjcg force-pushed the gh-421-dns-config branch from f24d64b to ef914ea Compare March 6, 2025 17:28
@hessjcg hessjcg force-pushed the gh-421-use-driver-hostname branch 2 times, most recently from bec7250 to aef0672 Compare March 6, 2025 17:39
@hessjcg hessjcg force-pushed the gh-421-dns-config branch 8 times, most recently from 0fe1de1 to 8b53b78 Compare March 10, 2025 19:54
@hessjcg hessjcg force-pushed the gh-421-use-driver-hostname branch 2 times, most recently from 8796cc6 to 02a478d Compare March 11, 2025 16:32
@hessjcg hessjcg changed the base branch from gh-421-dns-config to gh-421-dns-changes March 11, 2025 16:35
@hessjcg hessjcg force-pushed the gh-421-dns-changes branch from 8ac675a to 5865a71 Compare March 11, 2025 17:06
@hessjcg hessjcg force-pushed the gh-421-use-driver-hostname branch from 02a478d to 2441811 Compare March 11, 2025 17:06
@hessjcg hessjcg force-pushed the gh-421-dns-changes branch from 5865a71 to f40ed77 Compare March 17, 2025 16:11
@hessjcg hessjcg force-pushed the gh-421-use-driver-hostname branch from 2441811 to 1d57555 Compare March 17, 2025 16:11
hessjcg added 3 commits March 17, 2025 12:45
…to old database.

wip: periodic check for domain change

wip: periodic checks

wip: close sockets on instance closed
wip: make it work with mysql

wip: connector test fixes.
@hessjcg hessjcg force-pushed the gh-421-use-driver-hostname branch from 1d57555 to 2f65a7b Compare March 17, 2025 18:45
@hessjcg hessjcg force-pushed the gh-421-dns-changes branch 4 times, most recently from 97b5fbc to 00b6cc7 Compare March 21, 2025 15:32
@hessjcg hessjcg force-pushed the gh-421-dns-changes branch 2 times, most recently from 22f259b to 4c9d1c4 Compare March 21, 2025 16:19
Base automatically changed from gh-421-dns-changes to main March 21, 2025 16:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant