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

Support timeout / retry on Table.read_row() #941

Open
mwarkentin opened this issue Mar 15, 2024 · 0 comments
Open

Support timeout / retry on Table.read_row() #941

mwarkentin opened this issue Mar 15, 2024 · 0 comments
Assignees
Labels
api: bigtable Issues related to the googleapis/python-bigtable API.

Comments

@mwarkentin
Copy link

Is your feature request related to a problem? Please describe.

We recently experienced an issue where a small number of requests to BigTable using Table.read_row() hung until we hit the default 60s timeout. This caused issues with our application including the kafka consumer being kicked out of the consumer group after not responding for 30s.

We want to set a more aggressive timeout for this function call (eg. less than 30 seconds) however we haven't been able to figure out a way - read_row() does not seem to support either timeout or retry args which are the documented ways to set a timeout on a request.

Describe the solution you'd like

Support table.read_row("keyid", timeout=5)

Alternatively, support setting a new global default timeout via environment variable or config file.

Describe alternatives you've considered

Perhaps we could refactor our code to use read_rows() instead and fetch a single row, but this feels hacky.

Additional context

@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/python-bigtable API. label Mar 15, 2024
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.
Projects
None yet
Development

No branches or pull requests

2 participants