Skip to content

Commit e05a375

Browse files
committed
DatabaseClientImpl.runWithSessionRetry update on ID
1 parent 4db9dfb commit e05a375

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,18 +465,17 @@ <T> T runWithSessionRetry(BiFunction<Session, XGoogSpannerRequestId, T> callable
465465
PooledSessionFuture session = getSession();
466466
XGoogSpannerRequestId reqId =
467467
XGoogSpannerRequestId.of(
468-
this.dbId, Long.valueOf(session.getChannel()), this.nextNthRequest(), 0);
468+
this.dbId, Long.valueOf(session.getChannel()), this.nextNthRequest(), 1);
469469
while (true) {
470470
try {
471-
reqId.incrementAttempt();
472471
return callable.apply(session, reqId);
473472
} catch (SessionNotFoundException e) {
474473
session =
475474
(PooledSessionFuture)
476475
pool.getPooledSessionReplacementHandler().replaceSession(e, session);
477476
reqId =
478477
XGoogSpannerRequestId.of(
479-
this.dbId, Long.valueOf(session.getChannel()), this.nextNthRequest(), 0);
478+
this.dbId, Long.valueOf(session.getChannel()), this.nextNthRequest(), 1);
480479
}
481480
}
482481
}

0 commit comments

Comments
 (0)