grpc-java/xds
Eric Anderson 199a7ea3e8
xds: Improve XdsNR's selectConfig() variable handling
The variables from the do-while are no longer initialized to let the
compiler verify that the loop sets each. Unnecessary comparisons to null
are also removed and is more obvious as the variables are never set to
null. Added a minor optimization of computing the RPCs path once instead
of once for each route. The variable declarations were also sorted to
match their initialization order.

This does fix an unlikely bug where if the old code could successfully
matched a route but fail to retain the cluster, then when trying a
second time if the route was _not_ matched it would re-use the prior route
and thus infinite-loop failing to retain that same cluster.

It also adds a missing cast to unsigned long for a uint32 weight. The old
code would detect if the _sum_ was negative, but a weight using 32 bits
would have been negative and never selected.
2025-02-05 10:37:22 -08:00
..
src xds: Improve XdsNR's selectConfig() variable handling 2025-02-05 10:37:22 -08:00
third_party xds: Envoy proto sync to 2024-11-11 (#11816) 2025-01-17 14:58:52 +05:30
BUILD.bazel xds: Implement GcpAuthenticationFilter (#11638) 2024-11-06 16:39:00 +05:30
build.gradle Re-enable animalsniffer, fixing violations 2024-12-19 07:54:54 -08:00