Skip to content

Commit 03c383d

Browse files
olavloitesurbhigarg92
authored andcommitted
chore: include session min/max in error message (googleapis#3566)
1 parent 92c7276 commit 03c383d

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
@@ -2842,10 +2842,13 @@ private StringBuilder createCheckedOutSessionsStackTraces() {
28422842
// Create the error message without holding the lock, as we are potentially looping through a
28432843
// large set, and analyzing a large number of stack traces.
28442844
StringBuilder stackTraces =
2845-
new StringBuilder(
2846-
"There are currently "
2847-
+ currentlyCheckedOutSessions.size()
2848-
+ " sessions checked out:\n\n");
2845+
new StringBuilder("MinSessions: ")
2846+
.append(options.getMinSessions())
2847+
.append("\nMaxSessions: ")
2848+
.append(options.getMaxSessions())
2849+
.append("\nThere are currently ")
2850+
.append(currentlyCheckedOutSessions.size())
2851+
.append(" sessions checked out:\n\n");
28492852
if (options.isTrackStackTraceOfSessionCheckout()) {
28502853
for (PooledSessionFuture session : currentlyCheckedOutSessions) {
28512854
if (session.leakedException != null) {

0 commit comments

Comments
 (0)