A client called `run_in_transaction` be stuck if Spanner is down
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in packages/google-cloud-spanner/google/cloud/spanner_v1/database.py at run_in_transaction and its get_session call. Trace the transaction-running state when session creation fails while Spanner is unavailable, then add coverage for that failure path. Done means the client does not remain stuck and can retry when Spanner becomes available.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1.8k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 140
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/google-cloud-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
googleapis/google-cloud-python#19099 ·
Maintainers usually reply within 2 days
-
firestore: field path with a quoted name ending in a backslash is misparsedPossibly taken @sebxt claimed this 28 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
googleapis/google-cloud-python#18771 ·
Maintainers usually reply within 2 days
-
api: spanner type: feature request
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
googleapis/google-cloud-python#18584 ·
Maintainers usually reply within 2 days
-
auth: `impersonated_credentials` loses `subject` on copy, so `with_scopes()` and `with_quota_project()` turn off domain wide delegationPossibly taken @Om-singhaI claimed this 58 days ago. Openauth priority: p2 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
googleapis/google-cloud-python#18428 ·
Maintainers usually reply within 2 days
-
ci: enable --strict flag in presubmit twine_checkMay be free again @ohmayr claimed this 47 days ago, and no pull request is open. Open
Difficulty 1/5 Under an hour Newbie friendliness 76/100
googleapis/google-cloud-python#18339 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
All issues in googleapis/google-cloud-python
Similar issues
-
[Bug]: HTTP 499 (Client Closed Request) is classified as a non-retryable format_error, so a mid-flight abort fails the turn over instead of retryingPossibly taken @yipinghuang1991 claimed this today. Opencomp/agent P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NousResearch/hermes-agent#156837 ·
Maintainers usually reply within 1 day
-
Bug: Missing continue on ValueError in CpanBackend.check_feed causes UnboundLocalError or duplicate yieldsPossibly taken @muskan-creates352 claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
fedora-infra/anitya#2188 ·
Maintainers usually reply within 1 day
-
docs documentation need-triage SaaS
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
integration:hermes
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
vectorize-io/hindsight#6601 ·
Maintainers usually reply within 1 day
-
triage:product type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
dbt-labs/dbt-adapters#2333 ·
Maintainers usually reply within 1 day