Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: stop sending RPCs to deleted database (#34)
* fix: stop sending rpcs on deleted db * fix: client should stop sending rpcs after database dropped DatabaseClients should not continue to try to send RPCs to a database that has been deleted. Instead, the session pool will keep track of whether a database not found error has been returned for a database, and if so, will invalidate itself. All subsequent calls for this database will return a DatabaseNotFoundException without calling a RPC. If a database is re-created, the user must create a new DatabaseClient with a new session pool in order to resume usage of the database. Fixes #16 * fix: remove double check on isValid * fix: add wait to deleted db integration test * fix: process review comments * fix: update copyright year
- Loading branch information
Showing with 371 additions and 55 deletions.
- +34 −0 google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseNotFoundException.java
- +47 −1 google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java
- +11 −0 google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerExceptionFactory.java
- +11 −1 google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java
- +139 −35 google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java
- +53 −18 google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java
- +76 −0 google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseTest.java
There are no files selected for viewing
Oops, something went wrong.