Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
routing: avoid allocating new entry in EndpointRegistry.GetMetrics
EndpointRegistry.GetMetrics always allocates new entry even when data for the key already exists. sync.Map does not provide lazy initialization for the new value, see golang/go#44159 This change uses suggested best-effort to avoid allocating a new value on each load. Follow up on #2795 Signed-off-by: Alexander Yastrebov <[email protected]>
- Loading branch information