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

bug(BigQuery): Throw exception when reload function returns 499 status code #6756

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

zajca
Copy link
Contributor

@zajca zajca commented Nov 1, 2023

When jobTimeoutMs is set to run query and query timeouts WaitTrait causes to wait for result "indefinetly" (Job::MAX_RETRIES).

How to replicate issue:

$client = new BigQueryClient(...);
$client->runQuery($client->query(
    'WITH RECURSIVE counter AS (
              SELECT 1 AS n
              UNION ALL
              SELECT n+1 FROM counter WHERE n < 10000
            )
            
            SELECT 
              a.n AS val1, 
              b.n AS val2
            FROM 
              counter a 
            CROSS JOIN 
              counter b;',
    [
        'configuration' => [
            'jobTimeoutMs' => 10 * 1000,
        ],
    ]
));

Maybe there should be more status codes which should not be retried, but I so far run only into this problem.

BEGIN_COMMIT_OVERRIDE
fix(BigQuery): do not retry status code 499 (client canceled)
END_COMMIT_OVERRIDE

@zajca zajca requested review from a team as code owners November 1, 2023 10:43
@zajca zajca changed the title Throw exception when reload function returns 499 status code bug(BigQuery): Throw exception when reload function returns 499 status code Nov 1, 2023
zajca added a commit to keboola/google-bigquery-transformation that referenced this pull request Nov 1, 2023
zajca added a commit to keboola/google-bigquery-transformation that referenced this pull request Nov 1, 2023
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the BigQuery API. label Nov 3, 2023
Copy link
Contributor

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

Looks like this is the CANCELED code (e.g "Client closed request").

LGTM thanks for the contribution and sorry for the delay on reviewing it

@bshaffer bshaffer merged commit cd4fdc3 into googleapis:main Jun 3, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants