Closed harshachinta closed 2 months ago
Warning: This pull request is touching the following templated files:
@harshachinta Check if https://github.com/googleapis/java-spanner/pull/3156 is also a blocker for releasing mux. Reason: https://github.com/googleapis/java-spanner/blob/main/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java#L2971-L2975
Check if #3156 is also a blocker for releasing mux. Reason: https://github.com/googleapis/java-spanner/blob/main/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java#L2971-L2975
@harshachinta No, it's not a blocker. All of it is dead code, due to the static return false
in https://github.com/googleapis/java-spanner/blob/main/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java#L2971-L2975
With multiplexed sessions, the client optimizes and runs multiple applicable requests concurrently on a single session. A single multiplexed session is sufficient to handle all concurrent read-only traffic. Read/write transactions always use regular sessions. This can be enabled through an environment variable
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS
.Session management behavior in Java client,
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS
is set totrue
- Client uses multiplexed sessions.GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS
is set tofalse
- Client uses regular session cached in the session pool for running 1 concurrent transaction per session.GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS
is not set - Client uses default session management mechanism which is using regular session cached in the session pool.Note: Multiplexed sessions is unsupported when you use SpannerOption#enableGrpcGcpExtension. Enable multiplexed sessions when gRPC-GCP is unset.