Skip to content

Commit 8c85310

Browse files
Merge branch 'partitioned-query' of github.com:pratickchokhani/java-spanner into partitioned-query
2 parents 13b94e3 + 00a2578 commit 8c85310

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

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
@@ -317,7 +317,7 @@ public long executePartitionedUpdate(final Statement stmt, final UpdateOption...
317317
if (useMultiplexedSessionPartitionedOps) {
318318
return getMultiplexedSession().executePartitionedUpdate(stmt, options);
319319
}
320-
return executePartitionedUpdateSession(stmt, options);
320+
return executePartitionedUpdateWithPooledSession(stmt, options);
321321
}
322322

323323
private long executePartitionedUpdateWithPooledSession(

google-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedMultiplexedSessionTransaction.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,9 @@ private SessionReference getSessionReference() {
232232
*/
233233
@Override
234234
public long executePartitionedUpdate(Statement stmt, UpdateOption... options) {
235-
try {
236-
SessionReference sessionReference = getSessionReference();
237-
return new MultiplexedSessionTransaction(
238-
client, span, sessionReference, NO_CHANNEL_HINT, /* singleUse = */ true)
239-
.executePartitionedUpdate(stmt, options);
240-
} catch (InterruptedException e) {
241-
throw new RuntimeException(e);
242-
} catch (ExecutionException e) {
243-
throw new RuntimeException(e);
244-
}
235+
SessionReference sessionReference = getSessionReference();
236+
return new MultiplexedSessionTransaction(
237+
client, span, sessionReference, NO_CHANNEL_HINT, /* singleUse = */ true)
238+
.executePartitionedUpdate(stmt, options);
245239
}
246240
}

google-cloud-spanner/src/main/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,8 @@ public AsyncTransactionManager transactionManagerAsync(TransactionOption... opti
556556

557557
@Override
558558
public long executePartitionedUpdate(Statement stmt, UpdateOption... options) {
559-
return createMultiplexedSessionTransaction(/* singleUse = */ true).executePartitionedUpdate(stmt, options);
559+
return createMultiplexedSessionTransaction(/* singleUse = */ true)
560+
.executePartitionedUpdate(stmt, options);
560561
}
561562

562563
/**

0 commit comments

Comments
 (0)