Skip to content

Commit 3dc290a

Browse files
authored
chore: include session min/max in error message (#3566)
1 parent 56938e7 commit 3dc290a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2831,10 +2831,13 @@ private StringBuilder createCheckedOutSessionsStackTraces() {
28312831
// Create the error message without holding the lock, as we are potentially looping through a
28322832
// large set, and analyzing a large number of stack traces.
28332833
StringBuilder stackTraces =
2834-
new StringBuilder(
2835-
"There are currently "
2836-
+ currentlyCheckedOutSessions.size()
2837-
+ " sessions checked out:\n\n");
2834+
new StringBuilder("MinSessions: ")
2835+
.append(options.getMinSessions())
2836+
.append("\nMaxSessions: ")
2837+
.append(options.getMaxSessions())
2838+
.append("\nThere are currently ")
2839+
.append(currentlyCheckedOutSessions.size())
2840+
.append(" sessions checked out:\n\n");
28382841
if (options.isTrackStackTraceOfSessionCheckout()) {
28392842
for (PooledSessionFuture session : currentlyCheckedOutSessions) {
28402843
if (session.leakedException != null) {

0 commit comments

Comments
 (0)