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-1848371 adding connection.is_valid to perform connection validation on TCP/IP and Session levels #2117

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

sfc-gh-dszmolka
Copy link
Contributor

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-1848371

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    The PR is for covering a gap where seemingly there's no convenience method to tell 'is this connection still good enough to send queries over it?' . See details in the jira, but basically motivated by the situation where the cloud provider LB tears down the underlying idle connection unilaterally without telling the client, who then tries the submit the next query after the idleness ends, over a socket which is already closed on the other end - ending up with an error.

Having such a mechanism which the Node.js driver already has, gives the users a tool to conveniently control if the connection/session is still valid or they need to do something about it.

Plus fixing two very minor typos.

  1. (Optional) PR for stored-proc connector:

@sfc-gh-dszmolka sfc-gh-dszmolka added the DO_NOT_PORT_CHANGES_TO_SP Add this label when changes in this PR do not need to be port to SP connector label Dec 11, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka marked this pull request as ready for review December 11, 2024 11:48
@sfc-gh-dszmolka sfc-gh-dszmolka requested a review from a team December 11, 2024 11:48
src/snowflake/connector/connection.py Outdated Show resolved Hide resolved
test/integ/test_connection.py Outdated Show resolved Hide resolved
DESCRIPTION.md Outdated Show resolved Hide resolved
src/snowflake/connector/connection.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO_NOT_PORT_CHANGES_TO_SP Add this label when changes in this PR do not need to be port to SP connector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants