Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gossip: avoid allocation of UnresolvedAddr in getNodeIDAddressLocked
`getNodeIDAddressLocked` is called from `Dialer.ConnHealth` and `Dialer.DialInternalClient`. It was responsible for 1.71% of all allocations on a 3-node long running cluster that was running TPC-C 1K. Pointing into `nd.LocalityAddress` is safe because even if the `NodeDescriptor` itself is replaced in `Gossip`, the struct is never internally mutated. This is the same reason why taking the address of `nd.Address` was already safe. Release note (performance improvement): Avoid allocation when checking RPC connection health.
- Loading branch information