googleapis / googleapis/google-cloud-php

[Spanner] Add back requestTimeout to Spanner v2

Open
#9,617 2 comments 1 reaction 1 assignee Claimed by @Hectorhammett View on GitHub
Dominant language
PHP
Stars
1.2k
Forks
463
Avg merge
2d 1h
Merged PRs (30d)
145

Description

Spanner v2 library removed the `requestTimeout` option from the client options but I would like to see this revived.

Currently there is no way to set a default timeout for all outgoing requests and it's been a major pain to go around and add the timeouts individually. I am constantly worried that I might forget to add a timeout when writing a query.

When I was looking for places to add the timeouts, I also noticed that some methods like `Operation::transaction()` and `Transaction::rollback()` do no mention that there is a timeout option when it should.

Then there is `SessionCache::refresh()` which calls an API when creating a new session but does not allow us to set a timeout.

Please let me know what you think.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.