Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

A client called `run_in_transaction` be stuck if Spanner is down

Đang mở Phù hợp với người mới
#18,375 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
databases

Hướng nghiên cứu

Bắt đầu tại packages/google-cloud-spanner/google/cloud/spanner_v1/database.py, ở run_in_transaction và lệnh gọi get_session của nó. Theo dõi trạng thái đang chạy của giao dịch khi việc tạo session thất bại trong lúc Spanner không khả dụng, sau đó bổ sung coverage cho nhánh lỗi đó. Hoàn thành khi client không bị kẹt và có thể thử lại khi Spanner khả dụng trở lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

priority: p2 type: bug
Determine this is the right repository
  • I determined this is the correct repository in which to report this bug.
Summary of the issue

Context
When the Spanner is unavailable. If we call run_in_transaction, the Spanner client will stuck forever.

We believe the get_session should in the try catch block. Otherwise, the self._local.transaction_running = True will be forever True.

Expected Behavior:
The client will retry when the Spanner DB is back.

Actual Behavior:
The client stuck forever.

API client name and version

No response

Reproduction steps: code

No response

Reproduction steps: supporting files
  • Try to create a session when Spanner is unavailable.
  • The client will be stuck forever.
Reproduction steps: actual results

No response

Reproduction steps: expected results

No response

OS & version + platform

No response

Python environment

No response

Python dependencies

No response

Additional context

No response

Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
2 ngày 11 giờ
Pull request đã merge (30 ngày)
142

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của googleapis/google-cloud-python

Tất cả issue của googleapis/google-cloud-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.