Skip to content

Commit 039079e

Browse files
arpan14tlhquynh
authored andcommitted
chore: generalise session pool class for multiplexed session. (googleapis#2964)
* chore: generalise session pool class for multiplexed session. * chore: add back previous code. * chore: address comments.
1 parent 1e99310 commit 039079e

File tree

3 files changed

+172
-76
lines changed

3 files changed

+172
-76
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ private <T> T runWithSessionRetry(Function<Session, T> callable) {
257257
try {
258258
return callable.apply(session);
259259
} catch (SessionNotFoundException e) {
260-
session = pool.replaceSession(e, session);
260+
session =
261+
(PooledSessionFuture)
262+
pool.getPooledSessionReplacementHandler().replaceSession(e, session);
261263
}
262264
}
263265
}

0 commit comments

Comments
 (0)