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

SNOW-752633: honour KeepSessionAlive config in DSN #762

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ljpowlett
Copy link

Description

The to/from DSN functions do not honour the KeepSessionAlive config flag, leading to unexpected client timeout errors.

Fixes #738.

Checklist

  • Code compiles correctly
  • Run make fmt to fix inconsistent formats
  • Run make lint to get lint errors and fix all of them
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary

@github-actions
Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

Copy link
Collaborator

@sfc-gh-pfus sfc-gh-pfus left a 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))
Copy link
Collaborator

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":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here.

@sfc-gh-pfus
Copy link
Collaborator

@ljpowlett are you still ready to finish your PR?

@sfc-gh-pfus
Copy link
Collaborator

Hi @ljpowlett ! Do you still need this change?

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.

SNOW-752633: Session Keep-alive doesn't work as expected
2 participants