Support timeout / retry on Table.read_row() #941
Labels
api: bigtable
Issues related to the googleapis/python-bigtable API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
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 eithertimeout
orretry
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
The text was updated successfully, but these errors were encountered: