-
Notifications
You must be signed in to change notification settings - Fork 125
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
SNOW-752633: honour KeepSessionAlive config in DSN #762
base: master
Are you sure you want to change the base?
SNOW-752633: honour KeepSessionAlive config in DSN #762
Conversation
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @ljpowlett for your PR! It is much appreciated. Can you align with my comments and rebase?
@@ -186,6 +186,9 @@ func DSN(cfg *Config) (dsn string, err error) { | |||
params.Add(k, *v) | |||
} | |||
} | |||
if cfg.KeepSessionAlive { | |||
params.Add("client_session_keep_alive", strconv.FormatBool(cfg.KeepSessionAlive)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we stick to the variable name and naming conventions? I'd prefer calling this parameter keepSessionAlive
.
@@ -597,6 +600,11 @@ func parseDSNParams(cfg *Config, params string) (err error) { | |||
|
|||
case "token": | |||
cfg.Token = value | |||
case "client_session_keep_alive": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
@ljpowlett are you still ready to finish your PR? |
Hi @ljpowlett ! Do you still need this change? |
Description
The to/from DSN functions do not honour the
KeepSessionAlive
config flag, leading to unexpected client timeout errors.Fixes #738.
Checklist
make fmt
to fix inconsistent formatsmake lint
to get lint errors and fix all of them