mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-09 21:55:57 +08:00
Hi @tresni! While reviewing all the `ZoneCreator` implementations, I noticed that the ROUTE53 provider has an unsafe caching implementation for zones and `EnsureZoneExists` has a race-condition bug. `EnsureZoneExists` resets the cache before making the API call for creating a given zone. This might run concurrently to the processing of other zones and in turn could result in unexpected behavior: the cache could get re-populated before the creation of the zone completes and the new zone could be missing from the newly populated cache. This PR is making all access to the zone cache thread-safe and fixing the aforementioned race-condition. Would you mind giving this a try and let me know how it goes? Thanks! Bonus: The zone cache is no longer reset when creating zones. Instead, the cache is populated with the zone that is included in the API response from creating the zone. Part of https://github.com/StackExchange/dnscontrol/issues/3007 |
||
|---|---|---|
| .. | ||
| auditrecords.go | ||
| route53Provider.go | ||
| route53Provider_test.go | ||