Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit 6e65c3e

Browse files
committed
Return 0 for getChannel() with multiplexed sessions
1 parent d0c3b8e commit 6e65c3e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,9 @@ public XGoogSpannerRequestId.RequestIdCreator getRequestIdCreator() {
596596
}
597597

598598
int getChannel() {
599+
if (getIsMultiplexed()) {
600+
return 0;
601+
}
599602
Long channelHint = (Long) this.getOptions().get(SpannerRpc.Option.CHANNEL_HINT);
600603
return (int) (channelHint % this.spanner.getOptions().getNumChannels());
601604
}

0 commit comments

Comments
 (0)