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

Add ignore_non_running_query option to abort_query method #548

Open
chegoryu opened this issue Apr 24, 2024 · 1 comment
Open

Add ignore_non_running_query option to abort_query method #548

chegoryu opened this issue Apr 24, 2024 · 1 comment
Assignees
Labels
query tracker YQL/query tracker related

Comments

@chegoryu
Copy link
Contributor

chegoryu commented Apr 24, 2024

Currently, a race is possible when you try to abort a query, but query finishes between get_state and abort:

>>> client.get_query('8afed27-c66b620d-f4e2d5dc-89661f2b', attributes=["state"])
{'state': 'completed'}
>>> client.abort_query('8afed27-c66b620d-f4e2d5dc-89661f2b')
Traceback (most recent call last):
# ...
    params          {
                      "suppress_transaction_coordinator_sync": false,
                      "query_id": "8afed27-c66b620d-f4e2d5dc-89661f2b",
                      "stage": "production"
                    }
    transparent     True
Query 8afed27-c66b620d-f4e2d5dc-89661f2b not found or is not running

Something like ignore_non_running_query will be very convenient since 99.9% of the time you don't care about the result of the query when you decide to call abort.

@chizhonkova chizhonkova added the query tracker YQL/query tracker related label Apr 25, 2024
@chegoryu
Copy link
Contributor Author

Also I got this error when trying to retry abort request:

yt.common.YtResponseError: Cannot abort query e1970c13-8965a635-5d2ca50-9d52d4dd which is in state "aborting"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
query tracker YQL/query tracker related
Projects
None yet
Development

No branches or pull requests

3 participants