Eliminate validation so that code path is more heavily exercised (#11005)

* Eliminate validation so that code path is more heavily exercised
This commit is contained in:
Larry Safran 2024-03-12 20:41:03 +00:00 committed by GitHub
parent b3475a0e46
commit 27a3d8e278
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 6 deletions

View File

@ -131,14 +131,10 @@ final class PickFirstLeafLoadBalancer extends LoadBalancer {
// If the previous ready subchannel exists in new address list,
// keep this connection and don't create new subchannels
SocketAddress previousAddress = addressIndex.getCurrentAddress();
Attributes prevEagAttrs = addressIndex.getCurrentEagAttributes();
addressIndex.updateGroups(newImmutableAddressGroups);
if (addressIndex.seekTo(previousAddress)) {
if (!addressIndex.getCurrentEagAttributes().equals(prevEagAttrs)) {
log.log(Level.FINE, "EAG attributes changed, need to update subchannel");
SubchannelData subchannelData = subchannels.get(previousAddress);
subchannelData.getSubchannel().updateAddresses(addressIndex.getCurrentEagAsList());
}
SubchannelData subchannelData = subchannels.get(previousAddress);
subchannelData.getSubchannel().updateAddresses(addressIndex.getCurrentEagAsList());
return Status.OK;
} else {
addressIndex.reset(); // Previous ready subchannel not in the new list of addresses