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: Support timeouts per RPC invocation #378

Closed
olavloite opened this issue Aug 10, 2020 · 0 comments · Fixed by #379
Closed

feat: Support timeouts per RPC invocation #378

olavloite opened this issue Aug 10, 2020 · 0 comments · Fixed by #379
Assignees
Labels
api: spanner Issues related to the googleapis/java-spanner API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@olavloite
Copy link
Collaborator

The Spanner client allows a user to set custom timeouts while creating a SpannerOptions instance, but these timeouts are static and are applied to all invocations of the RPCs. Sometimes applying a custom timeout to a specific RPC invocation is desirable.

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Aug 10, 2020
olavloite added a commit that referenced this issue Aug 10, 2020
The Spanner client allows a user to set custom timeouts while creating a
SpannerOptions instance, but these timeouts are static and are applied to
all invocations of the RPCs. This change introduces the possibility to set
custom timeouts and other call options on a per-RPC basis.

Fixes #378
@hengfengli hengfengli added priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Aug 11, 2020
olavloite added a commit that referenced this issue Aug 25, 2020
* feat: support setting timeout per RPC

The Spanner client allows a user to set custom timeouts while creating a
SpannerOptions instance, but these timeouts are static and are applied to
all invocations of the RPCs. This change introduces the possibility to set
custom timeouts and other call options on a per-RPC basis.

Fixes #378

* fix: change grpc deps from test to compile scope

* fix: address review comments

* fix: resolve review comment
olavloite added a commit that referenced this issue Oct 8, 2020
* feat: support setting timeout per RPC

The Spanner client allows a user to set custom timeouts while creating a
SpannerOptions instance, but these timeouts are static and are applied to
all invocations of the RPCs. This change introduces the possibility to set
custom timeouts and other call options on a per-RPC basis.

Fixes #378

* fix: change grpc deps from test to compile scope

* feat: add async api for connection

* fix: fix test failures

* fix: move state handling from callback to callable

* fix: fix integration tests with emulator

* fix: fix timeout integration test on emulator

* fix: prevent flakiness in DDL tests

* fix: fix clirr build failures

* fix: do not set transaction state for Aborted err

* fix: set transaction state after retry

* cleanup: remove sync methods and use async instead

* cleanup: remove unused code

* feat: make ddl async

* fix: reduce timeout and remove debug info

* feat: make runBatch async

* test: set forkCount to 1 to investigate test failure

* fix: linting + clirr

* fix: prevent deadlock in DmlBatch

* fix: fix DMLBatch state handling

* tests: add tests for aborted async transactions

* test: add aborted tests

* fix: add change to clirr + more tests

* fix: require a rollback after a tx has aborted

* docs: add javadoc for new methods

* tests: add integration tests

* fix: wait for commit before select

* fix: fix handling aborted commit

* docs: document behavior -Async methods

* fix: iterating without callback could cause exception

* fix: remove todos and commented code

* feat: keep track of caller to include in stacktrace

* docs: explain why Aborted is active

* fix: use ticker for better testability

* test: increase coverage and remove unused code

* test: add additional tests

* docs: add missing @OverRide

* docs: fix comment
thiagotnunes pushed a commit to thiagotnunes/java-spanner that referenced this issue Jun 5, 2021
* feat: support setting timeout per RPC

The Spanner client allows a user to set custom timeouts while creating a
SpannerOptions instance, but these timeouts are static and are applied to
all invocations of the RPCs. This change introduces the possibility to set
custom timeouts and other call options on a per-RPC basis.

Fixes googleapis#378

* fix: change grpc deps from test to compile scope

* fix: address review comments

* fix: resolve review comment
rajatbhatta pushed a commit to rajatbhatta/java-spanner that referenced this issue Nov 17, 2022
This PR was generated using Autosynth. 🌈


<details><summary>Log from Synthtool</summary>

```
2021-03-01 04:56:52,060 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-spanner-jdbc/.github/readme/synth.py.
On branch autosynth-readme
nothing to commit, working tree clean
2021-03-01 04:56:53,654 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata.

```
</details>

Full log will be available here:
https://source.cloud.google.com/results/invocations/968851b6-f8e2-44a3-862d-22d02bb1ed7a/targets

- [ ] To automatically regenerate this PR, check this box.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants