Skip to content

Commit d15b973

Browse files
author
Sneha Shah
committed
Fix: writeAtLeastOnce should use a ReadWriteSession
1 parent f69e7fa commit d15b973

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public Timestamp write(Iterable<Mutation> mutations) throws SpannerException {
5858
public Timestamp writeAtLeastOnce(Iterable<Mutation> mutations) throws SpannerException {
5959
Span span = tracer.spanBuilder(READ_WRITE_TRANSACTION).startSpan();
6060
try (Scope s = tracer.withSpan(span)) {
61-
return pool.getReadSession().writeAtLeastOnce(mutations);
61+
return pool.getReadWriteSession().writeAtLeastOnce(mutations);
6262
} catch (RuntimeException e) {
6363
TraceUtil.endSpanWithFailure(span, e);
6464
throw e;

0 commit comments

Comments
 (0)