Skip to content

Commit 44fd132

Browse files
authored
chore: disable tracking where sessions are checked out (GoogleCloudPlatform#3156)
Skip tracking where sessions are checked out of the pool, as there should be no need to debug session leaks in PGAdapter. This feature creates an exception for every sesion that is checked out, which wastes a few CPU cycles for every transaction.
1 parent c461edd commit 44fd132

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/com/google/cloud/spanner/PGAdapterSessionPoolOptionsHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ private PGAdapterSessionPoolOptionsHelper() {}
2727
@InternalApi
2828
public static SessionPoolOptions.Builder useMultiplexedSessions(
2929
SessionPoolOptions.Builder builder) {
30+
// Disable tracking where regular sessions are checked out, as debugging session leaks in
31+
// PGAdapter should not be necessary.
32+
builder.setTrackStackTraceOfSessionCheckout(false);
3033
return builder.setUseMultiplexedSession(true);
3134
}
3235
}

0 commit comments

Comments
 (0)