-
Notifications
You must be signed in to change notification settings - Fork 104
Comparing changes
Open a pull request
base repository: googleapis/python-spanner
base: v3.62.0
head repository: googleapis/python-spanner
compare: v3.63.0
- 5 commits
- 48 files changed
- 4 contributors
Commits on Jan 16, 2026
-
chore: Add gcp resource name span attribute (#1480)
Adding a new span attribute called gcp.resource.name which contains an identifier to a particular spanner instance and database in the following format: //spanner.googleapis.com/projects/{project}/instances/{instance_id}/databases/{database_id} Example: //spanner.googleapis.com/projects/my_project/instances/my_instance/databases/my_databaseConfiguration menu - View commit details
-
Copy full SHA for ed4735b - Browse repository at this point
Copy the full SHA ed4735bView commit details
Commits on Jan 22, 2026
-
feat: add requestID info in error exceptions (#1415)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-spanner/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
Configuration menu - View commit details
-
Copy full SHA for 2c5eb96 - Browse repository at this point
Copy the full SHA 2c5eb96View commit details
Commits on Feb 11, 2026
-
docs(spanner): snippet for setting read lock mode (#1473)
… Snippet shows how to set the read lock mode at the client-level and how to override the option at the transaction-level.
Configuration menu - View commit details
-
Copy full SHA for 7e79920 - Browse repository at this point
Copy the full SHA 7e79920View commit details -
fix(metrics): prevent thread leak by ensuring singleton initialization (
#1492) ****Summary:**** This PR fixes a critical memory and thread leak in the google-cloud-spanner client when built-in metrics are enabled (default behavior). Previously, the Client constructor unconditionally initialized a new OpenTelemetry MeterProvider and PeriodicExportingMetricReader on every instantiation. Each reader spawned a new background thread for metric exporting that was never cleaned up or reused. In environments where Client objects are frequently created (e.g., Cloud Functions, web servers, or data pipelines), this caused a linear accumulation of threads, leading to RuntimeError: can't start new thread and OOM crashes. ****Fix Implementation:**** ***Refactored Metrics Initialization (Thread Safety & Memory Leak Fix)***: Implemented a Singleton pattern for the OpenTelemetry MeterProvider using threading.Lock to prevent infinite background thread creation (memory leak). Moved metrics initialization logic to a cleaner helper function _initialize_metrics in client.py. Replaced global mutable state in SpannerMetricsTracerFactory with contextvars.ContextVar to ensure thread-safe, isolated metric tracing across concurrent requests. Updated MetricsInterceptor and MetricsCapture to correctly use the thread-local tracer. ***Fixed Batch.commit Idempotency (AlreadyExists Regression):*** Modified Batch.commit to initialize nth_request and the attempt counter outside the retry loop. This ensures that retries (e.g., on ABORTED) reuse the same Request ID, allowing Cloud Spanner to correctly deduplicate requests and preventing spurious AlreadyExists (409) errors. ***Verification:*** Added tests/unit/test_metrics_concurrency.py to verify tracer isolation and thread safety. Cleaned up tests/unit/test_metrics.py and consolidated mocks in conftest.py.
Configuration menu - View commit details
-
Copy full SHA for e792136 - Browse repository at this point
Copy the full SHA e792136View commit details
Commits on Feb 13, 2026
-
chore: librarian release pull request: 20260213T101303Z (#1497)
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v1.0.0 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209 <details><summary>google-cloud-spanner: 3.63.0</summary> ## [3.63.0](v3.62.0...v3.63.0) (2026-02-13) ### Features * add requestID info in error exceptions (#1415) ([2c5eb96](2c5eb96c)) ### Bug Fixes * prevent thread leak by ensuring singleton initialization (#1492) ([e792136](e792136a)) ### Documentation * snippet for setting read lock mode (#1473) ([7e79920](7e79920c)) </details>
Configuration menu - View commit details
-
Copy full SHA for 64f1dbf - Browse repository at this point
Copy the full SHA 64f1dbfView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.62.0...v3.63.0