diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b569a6f45..ad7d940cd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ and what APIs have changed, if applicable. ## [Unreleased] +## [29.48.9] - 2023-12-20 +- No-op proxy detector for xDS gRPC channel builder. +- Warning for unsupported `zero-allocation-hashing` library versions. + ## [29.48.8] - 2023-12-19 - add warn logs about invalid property versions @@ -5587,7 +5591,8 @@ patch operations can re-use these classes for generating patch messages. ## [0.14.1] -[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.48.8...master +[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.48.9...master +[29.48.9]: https://github.com/linkedin/rest.li/compare/v29.48.8...v29.48.9 [29.48.8]: https://github.com/linkedin/rest.li/compare/v29.48.7...v29.48.8 [29.48.7]: https://github.com/linkedin/rest.li/compare/v29.48.6...v29.48.7 [29.48.6]: https://github.com/linkedin/rest.li/compare/v29.48.5...v29.48.6 diff --git a/d2/src/main/java/com/linkedin/d2/balancer/util/hashing/MPConsistentHashRing.java b/d2/src/main/java/com/linkedin/d2/balancer/util/hashing/MPConsistentHashRing.java index a634e482d2..a235340041 100644 --- a/d2/src/main/java/com/linkedin/d2/balancer/util/hashing/MPConsistentHashRing.java +++ b/d2/src/main/java/com/linkedin/d2/balancer/util/hashing/MPConsistentHashRing.java @@ -53,6 +53,15 @@ public class MPConsistentHashRing implements Ring public static final int DEFAULT_POINTS_PER_HOST = 1; private static final Logger LOG = LoggerFactory.getLogger(ConsistentHashRing.class); + static { + try { + LongHashFunction.class.getMethod("xx_r39", long.class); + } catch (NoSuchMethodException ex) { + LOG.error("Required method xx_r39 not found, this means an unsupported version of the " + + "zero-allocation-hashing library is being used. Do not use later than 0.7 if you want to use pegasus", ex); + throw new RuntimeException(ex); + } + } private static final LongHashFunction HASH_FUNCTION_0 = LongHashFunction.xx_r39(0xDEADBEEF); private static final Charset UTF8 = Charset.forName("UTF-8"); /* we will only use the lower 32 bit of the hash code to avoid overflow */ diff --git a/d2/src/main/java/com/linkedin/d2/xds/XdsChannelFactory.java b/d2/src/main/java/com/linkedin/d2/xds/XdsChannelFactory.java index 2eed5f82d0..f0a3b01880 100644 --- a/d2/src/main/java/com/linkedin/d2/xds/XdsChannelFactory.java +++ b/d2/src/main/java/com/linkedin/d2/xds/XdsChannelFactory.java @@ -17,6 +17,7 @@ package com.linkedin.d2.xds; import io.grpc.ManagedChannel; +import io.grpc.internal.GrpcUtil; import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder; import io.grpc.netty.shaded.io.netty.handler.ssl.SslContext; import java.util.concurrent.TimeUnit; @@ -53,6 +54,8 @@ public ManagedChannel createChannel() } return builder.keepAliveTime(5, TimeUnit.MINUTES) + // No proxy wanted here; the default proxy detector can mistakenly detect forwarded ports as proxies. + .proxyDetector(GrpcUtil.NOOP_PROXY_DETECTOR) .build(); } } diff --git a/gradle.properties b/gradle.properties index 2e9da9f38a..cf397bf3d4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=29.48.8 +version=29.48.9 group=com.linkedin.pegasus org.gradle.configureondemand=true org.gradle.parallel=true