- Notifications
You must be signed in to change notification settings - Fork 135
Closed
Labels
api: spannerIssues related to the googleapis/java-spanner API.Issues related to the googleapis/java-spanner API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
The following transaction will wait indefinitely because the first query of the transaction will never actually be executed. All subsequent statements will however wait for a transaction id to be returned by this query.
DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); client.readWriteTransaction().run(new TransactionCallable<Void>() { @Override public Void run(TransactionContext transaction) throws Exception { transaction.executeQuery("SELECT 1"); // Any RPC on the transaction after this will hang, including the Commit call that will // be executed when this method returns. So this transaction will never finish. return null; } });Metadata
Metadata
Assignees
Labels
api: spannerIssues related to the googleapis/java-spanner API.Issues related to the googleapis/java-spanner API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.