Skip to content

Commit 6e65c3e

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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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)