Skip to content

feat(spanner): make admin client gRPC timeout configurable#426

Merged
yoshidan merged 2 commits intoyoshidan:mainfrom
devgony:increase-timeout
Mar 16, 2026
Merged

feat(spanner): make admin client gRPC timeout configurable#426
yoshidan merged 2 commits intoyoshidan:mainfrom
devgony:increase-timeout

Conversation

@devgony
Copy link
Contributor

@devgony devgony commented Feb 21, 2026

Summary

  • The Spanner admin client had hardcoded 30-second timeouts for both per-request and connection establishment on the tonic gRPC channel
  • DDL operations (e.g. create_database, update_database_ddl) can take well over 30 seconds on real GCP Spanner, causing op.wait() to fail at the transport level
  • Added timeout and connect_timeout fields to AdminClientConfig, defaulting to 30s for backward compatibility
  • Users can now override these values for long-running DDL workloads

Test plan

  • cargo check -p gcloud-spanner passes
  • Existing test (change_stream_test.rs) updated to use ..Default::default() — no behavioral change
  • Default values (30s) preserve existing behavior for all current users

The admin client had hardcoded 30s timeouts for both request and
connection, which caused failures during long-running DDL operations
(e.g. create/alter table). Add timeout and connect_timeout fields to
AdminClientConfig so users can override these values. Defaults remain
at 30s for backward compatibility.
@yoshidan yoshidan added the safe to test safe to test label Mar 1, 2026
@yoshidan yoshidan merged commit 9e7c99b into yoshidan:main Mar 16, 2026
1 of 9 checks passed
@yoshidan
Copy link
Owner

Thank you for your contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test safe to test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants