There was a problem with the mutex protecting the endpoints map. The getEndpoints method is used by the internal reconcile as well as external calls via GetHost/GetAllHosts from the http handler.
This can be abused and may affect the service quality and block the reconcile process
The sync.Map though is optimized for this use case:
(1) when the entry for a given key is only ever written once but read many times, as in caches that only grow
There was a problem with the mutex protecting the endpoints map. The
getEndpoints
method is used by the internal reconcile as well as external calls viaGetHost/GetAllHosts
from the http handler. This can be abused and may affect the service quality and block the reconcile processThe sync.Map though is optimized for this use case:
https://pkg.go.dev/sync#Map
I noticed this pattern in other areas as well. I am very new to this project and will do smaller PRs to address them.