GoogleCloudPlatform / GoogleCloudPlatform/cloud-spanner-emulator

Deleting a session with an active read/write transaction leaves the emulator in an invalid state

Open
#30 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
334
Forks
77
Avg merge
8m
Merged PRs (30d)
2

Description

If you execute the following steps:
1. Create a session with name `session-1`
2. Start a read/write transaction on `session-1`
3. Execute at least one statement on the read/write transaction on `session-1`
4. Delete `session-1` while the transaction is still active
5. Trying to commit/rollback the transaction on `session-1` will fail with a `Transaction not found` error.
6. Trying to begin a new read/write transaction will fail with the error that the emulator only supports one simultaneous transaction.

The above steps will therefore leave the emulator in an invalid state, as it is impossible to end the non-existing transaction, and also impossible to start a new one.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.