push
travis-ci
<a href="https://github.com/grpc/grpc-java/commit/<a class=hub.com/grpc/grpc-java/commit/2cbc7fc3a5b98122cdd67bc881aefa3eef8e1b65">2cbc7fc3a<a href="https://github.com/grpc/grpc-java/commit/2cbc7fc3a5b98122cdd67bc881aefa3eef8e1b65">">grpclb: skip fallback if the LB is already in fallback mode (#8253) Manually checks if the gRPCLB policy is already in fallback mode when trying to fallback due to receiving address update without LB addresses. Commit </a><a class="double-link" href="https://github.com/grpc/grpc-java/commit/<a class="double-link" href="https://github.com/grpc/grpc-java/commit/b956f8852d36adc54eb60649d7b82896b399d723">b956f8852</a>">b956f8852</a><a href="https://github.com/grpc/grpc-java/commit/2cbc7fc3a5b98122cdd67bc881aefa3eef8e1b65"> added an invariant check in the FallbackModeTask runnable to ensure the task is fired only when the LB is not already in fallback mode. However, that commit missed the case that receiving address updates without LB addresses can trigger the run of FallbackModeTask runnable, because the existing implementation chose to reuse the code in FallbackModeTask. In such case, running FallbackModeTask could break the invariant check as the LB policy may already in fallback mode. This change eliminates the reuse of FallbackModeTask for handling address update without LB address. That is, every time receiving address update, we manually check if it is already in fallback instead of reusing to FallbackModeTask perform the check. Note there was a discussion brought up whether we should force entering fallback (shutdown existing subchannels) or we should still keep the balancer connection. Different languages have already diverged on this. Go shuts down the balancer connection and all subchannel connections to force using fallback addresses. C-core keep the balancer connection working and does not shutdown subchannels, only let fallback happens after the existing balancer connection and subchannel connections become broken. Java shuts down the balancer connection but not subchannels. This change does not try to change the existing behavior, but only fixes the invariant check breakage. ------------------- See bug reported in b/190700476
27110 of 30737 relevant lines covered (88.2%)
0.88 hits per line