Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

mysql: context #2619

Merged
merged 2 commits into from
Feb 25, 2025
Merged

mysql: context #2619

merged 2 commits into from
Feb 25, 2025

Conversation

serprex
Copy link
Member

@serprex serprex commented Feb 21, 2025

based on go-mysql-org/go-mysql#997 without having to switch to database/sql

logger log.Logger
config *protos.MySqlConfig
ssh utils.SSHTunnel
conn atomic.Pointer[client.Conn]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that the use of atomics here does not expose a threadsafe interface, this is only to avoid race conditions on c.conn being replaced during retries & context watcher reading c.conn

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be a comment just in case

logger log.Logger
config *protos.MySqlConfig
ssh utils.SSHTunnel
conn atomic.Pointer[client.Conn]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be a comment just in case

@serprex serprex enabled auto-merge (squash) February 25, 2025 19:28
@serprex serprex merged commit 075b6e8 into main Feb 25, 2025
9 checks passed
@serprex serprex deleted the mysql-context branch February 25, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants