Skip to content

Commit

Permalink
chore(Spanner): fix mockspanner
Browse files Browse the repository at this point in the history
  • Loading branch information
harshachinta committed Dec 26, 2024
1 parent adfd072 commit 875b49f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,9 @@ public void commit(CommitRequest request, StreamObserver<CommitResponse> respons
return;
}
sessionLastUsed.put(session.getName(), Instant.now());
if (session.getMultiplexed() && !request.hasPrecommitToken()) {
if (session.getMultiplexed()
&& !request.hasPrecommitToken()
&& !request.hasSingleUseTransaction()) {
throw Status.INVALID_ARGUMENT
.withDescription(
"A Commit request for a read-write transaction on a multiplexed session must specify a precommit token.")
Expand Down

0 comments on commit 875b49f

Please sign in to comment.