Skip to content

Clear map of seen proxy IP addresses

We were not previously clearing the map we keep of seen IP addresses, which resulted in our unique proxy IP counts representing churn rather than unique IP counts per day, except during broker process restarts.

This is not a perfect solution, it's possible proxies will poll between the call to m.logger.Println("snowflake-ips", displayCountryStats(m.proxies, false)) and m.ips.Clear(). In order for it to affect the metrics output for the next day, that proxy IP would need to me in the m.ips map, and then not poll again that same day. I think this will be a rare case and that it's still worth avoiding the use of mutexes in our metrics code.

Closes #40472 (closed)

Merge request reports

Loading