Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

perf: don't fetch rows when waiting for query to finish - #400

Merged
gcf-merge-on-green[bot] merged 7 commits into
googleapis:masterfrom
tswast:issue394-revert-rows-cache
Nov 24, 2020
Merged

perf: don't fetch rows when waiting for query to finish#400
gcf-merge-on-green[bot] merged 7 commits into
googleapis:masterfrom
tswast:issue394-revert-rows-cache

Conversation

@tswast

@tswasttswast commented Nov 24, 2020

Copy link
Copy Markdown
Contributor

When there are large result sets, fetching rows while waiting for the
query to finish can cause the API to hang indefinitely. (This may be due
to an interaction between connection timeout and API timeout.)

This reverts commit 86f6a51 (#374).

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixesgoogleapis/python-bigquery-pandas#343
Fixes#394 🦕

When there are large result sets, fetching rows while waiting for the
query to finish can cause the API to hang indefinitely. (This may be due
to an interaction between connection timeout and API timeout.)
This reverts commit 86f6a51 (googleapis#374).
@tswast
tswast requested review from a team and pmakaniNovember 24, 2020 19:33
@google-clagoogle-claBot added the cla: yes This human has signed the Contributor License Agreement. label Nov 24, 2020
@product-auto-labelproduct-auto-labelBot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Nov 24, 2020
@tswast
tswast requested review from shollyman and removed request for pmakaniNovember 24, 2020 19:33
@tswasttswast mentioned this pull request Nov 24, 2020

api_request.assert_called_once_with(method="GET", path=path, query_params={})

def test_iterate_with_cached_first_page(self):

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I add these tests to fix coverage.

Perhaps instead I should also be reverting the changes from #384 ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The alternative I'd consider is doing a flag-based feature, so users can turn on the latency changes (or flip default, and provide an opt-out while we diagnose these other cases).


api_request.assert_called_once_with(method="GET", path=path, query_params={})

def test_iterate_with_cached_first_page(self):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The alternative I'd consider is doing a flag-based feature, so users can turn on the latency changes (or flip default, and provide an opt-out while we diagnose these other cases).

@tswasttswast added the automerge Merge the pull request once unit tests and other checks pass. label Nov 24, 2020
@tswasttswast mentioned this pull request Nov 24, 2020
7 tasks
@gcf-merge-on-green
gcf-merge-on-greenBot merged commit 730df17 into googleapis:masterNov 24, 2020
@gcf-merge-on-greengcf-merge-on-greenBot removed the automerge Merge the pull request once unit tests and other checks pass. label Nov 24, 2020
@tswast
tswast deleted the issue394-revert-rows-cache branch November 16, 2023 20:43
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

simple query hangs in 0.14.1, works in 0.13.3 increased memory usage in 2.4.0

2 participants

@tswast@shollyman