8000 Comparing v3.62.0...v3.63.0 · googleapis/python-spanner · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/python-spanner
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.62.0
Choose a base ref
...
head repository: googleapis/python-spanner
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.63.0
Choose a head ref
  • 5 commits
  • 48 files changed
  • 4 contributors

Commits on Jan 16, 2026

  1. 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_database
    surbhigarg92 authored Jan 16, 2026
    Configuration menu
    Copy the full SHA
    ed4735b View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2026

  1. 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> 🦕
    rahul2393 authored Jan 22, 2026
    Configuration menu
    Copy the full SHA
    2c5eb96 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2026

  1. 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.
    skuruppu authored Feb 11, 2026
    Configuration menu
    Copy the full SHA
    7e79920 View commit details
    Browse the repository at this point in the history
  2. 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.
    sinhasubham authored Feb 11, 2026
    Configuration menu
    Copy the full SHA
    e792136 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2026

  1. 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>
    rahul2393 authored Feb 13, 2026
    Configuration menu
    Copy the full SHA
    64f1dbf View commit details
    Browse the repository at this point in the history
Loading
0