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-923450: Misleading log message for query that times out #1738

Closed
aneeshdurg opened this issue Sep 25, 2023 · 3 comments · May be fixed by #1753
Closed

SNOW-923450: Misleading log message for query that times out #1738

aneeshdurg opened this issue Sep 25, 2023 · 3 comments · May be fixed by #1753
Assignees
Labels
bug status-triage_done Initial triage done, will be further handled by the driver team

Comments

@aneeshdurg
Copy link

Python version

Python 3.10.11 | packaged by conda-forge | (main, May 10 2023, 19:01:19) [Clang 14.0.6 ]

Operating system and processor architecture

macOS-12.6.7-arm64-arm-64bit

Installed packages

NA

What did you do?

Run a query with a short timeout and enable debug logging

What did you expect to see?

A log message indicating that the timer fired and cancelled the query, however, the same log message is emitted whether the query timed out or not.

Can you set logging to DEBUG and collect the logs?

import logging
import os

for logger_name in ('snowflake.connector',):
    logger = logging.getLogger(logger_name)
    logger.setLevel(logging.DEBUG)
    ch = logging.StreamHandler()
    ch.setLevel(logging.DEBUG)
    ch.setFormatter(logging.Formatter('%(asctime)s - %(threadName)s %(filename)s:%(lineno)d - %(funcName)s() - %(levelname)s - %(message)s'))
    logger.addHandler(ch)
@github-actions github-actions bot changed the title Misleading log message for query that times out SNOW-923450: Misleading log message for query that times out Sep 25, 2023
@sfc-gh-yixie
Copy link
Collaborator

@aneeshdurg To double confirm, for "Run a query with a short timeout and enable debug logging", did you set STATEMENT_TIMEOUT_IN_SECONDS ?

@aneeshdurg
Copy link
Author

@sfc-gh-yixie , no I set the timeout parameter of SnowflakeCursor.execute. The timeout functionality works, but the log message is just slightly misleading, see the PR I opened to fix this.

@sfc-gh-dszmolka
Copy link

the associated PR seems to be approved for quite some time now, but for some reason wasn't merged (not closed)
can you please proceed taking it further and merge it if it's still needed, or close it if it's not ?

anyhow ; thank you for raising this issue and especially your contribution !

@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Mar 8, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team and removed needs triage labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
3 participants