Avoid host_list_disconnection logs when no LB hosts are disconnected

!130432 (merged) introduced host_list_disconnection events to get more insights on hosts getting disconnected while refreshing LB hosts.

There are a lot of noise (~280,000 events per day) in logs recently, with { event: host_list_disconnection, message: Disconnected [] old load balancing hosts after .* }

Log link: https://log.gprd.gitlab.net/app/r/s/smWD7

Reason: This would happen when the old_hosts sent to disconnect_old_hosts method is empty, which would be the likely scenario on new pods (server) booting up.

Solution: Returning from disconnect_old_hosts method unless hosts_to_disconnect.present? would fix this.

Assignee Loading
Time tracking Loading