diff --git a/java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SwitchingChannelPool.java b/java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SwitchingChannelPool.java index a8b727d27b1c..c34fa30ac1d9 100644 --- a/java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SwitchingChannelPool.java +++ b/java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SwitchingChannelPool.java @@ -116,13 +116,16 @@ private ChannelPool createChannelPoolForCurrentMode() { case DIRECT_ACCESS_ONLY: return newChannelPoolFromProvider(channelProvider); case DIRECT_ACCESS_WITH_FALLBACK: - ChannelPool primaryChannelPool = - newChannelPoolFromProvider( - channelProvider, - "primary", - new DirectpathEnforcer( - "Non-directpath connections are not allowed in the directpath channel " - + "pool when a fallback channel pool is available.")); + // TODO: temporarily NOT installing the DirectpathEnforcer. + // The enforcer rejects any non-ALTS connection on the directpath pool by throwing out of + // onHeaders; grpc turns that into CANCELLED "Failed to read headers", killing every session + // in state STARTING. On a VM whose directpath structurally negotiates a non-ALTS (CFE/TLS) + // connection, recovery depends entirely on FallbackChannelPool switching to cloudpath, and + // that error-rate switch can fail to fire, wedging the VM indefinitely. Until that switch + // is hardened, drop the enforcer so such a connection is used (grpc's own directpath->CFE + // fallback) instead of hard-failing. Restore the enforcer once FallbackChannelPool is + // fixed. + ChannelPool primaryChannelPool = newChannelPoolFromProvider(channelProvider, "primary"); ChannelPool fallbackChannelPool = newChannelPoolFromProvider(channelProvider.getFallback().get(), "fallback"); FallbackConfiguration fallbackConfiguration =