Closed
@olavloite

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;
      }
});