Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When adding a temporary TODO comment, it is best practice to include a tracking issue or ticket reference. This ensures that the temporary workaround is tracked and eventually resolved, preventing it from becoming permanent technical debt.

Suggested change
// TODO: temporarily NOT installing the DirectpathEnforcer.
// TODO(issue-number): temporarily NOT installing the DirectpathEnforcer.
References
  1. According to the Google Java Style Guide (Section 4.8.6.2), TODO comments should include an identifier (such as a bug tracker reference or username) to provide context and ensure traceability. (link)

// 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 =
Expand Down
Loading