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

feat: improve async sharding #977

Merged
merged 6 commits into from
Jun 11, 2024
Merged

feat: improve async sharding #977

merged 6 commits into from
Jun 11, 2024

Conversation

daniel-sanche
Copy link
Contributor

@daniel-sanche daniel-sanche commented Jun 4, 2024

Use a semaphore to control shard concurrency, rather than discrete batches

Copy link

conventional-commit-lint-gcf bot commented Jun 4, 2024

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigtable Issues related to the googleapis/python-bigtable API. labels Jun 4, 2024
@daniel-sanche daniel-sanche changed the title [DRAFT] feat: improve async sharding feat: improve async sharding Jun 5, 2024
@daniel-sanche daniel-sanche marked this pull request as ready for review June 5, 2024 20:17
@daniel-sanche daniel-sanche requested review from a team as code owners June 5, 2024 20:17
@bhshkh bhshkh removed their assignment Jun 6, 2024
@daniel-sanche daniel-sanche added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 10, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 10, 2024
@daniel-sanche daniel-sanche added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 10, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 10, 2024
@@ -755,6 +755,10 @@ async def read_rows_with_semaphore(query):
async with concurrency_sem:
# calculate new timeout based on time left in overall operation
shard_timeout = next(rpc_timeout_generator)
if shard_timeout <= 0:
raise DeadlineExceeded(
"Operation timeout exceeded before starting query"
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe before starting subquery?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the earliest we can check after getting through the semaphore.

There is a similar check at the very beginning as part of _get_timeouts though (which raises an AttributeError)

@daniel-sanche daniel-sanche added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 11, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 11, 2024
@daniel-sanche daniel-sanche merged commit fd1f7da into main Jun 11, 2024
30 of 32 checks passed
@daniel-sanche daniel-sanche deleted the improve_sharding branch June 11, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/python-bigtable API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants