Open g-andrade opened 2 years ago
Hi,
I've been using erldns 2.2.0 as a library (great library, by the way!)
erldns
I happened to take a look into erldns_zone_cache:put_zone/1 and, if the cache works the way I superficially understood it to, there appears to be race condition between invoking delete_zone_records/1 and put_zone/2. https://github.com/dnsimple/erldns/blob/97d2b8ec029f89eec4adb5f49af6d241d457bf86/src/erldns_zone_cache.erl#L277-L283
erldns_zone_cache:put_zone/1
delete_zone_records/1
put_zone/2
Did I understood it correctly? Is there a tiny window where lookups might fail every time put_zone/1 is used? If so, would you be open to changing the order between calls? I'd be available for a PR.
put_zone/1
Thanks!
(Bump)
(Bump 🥺)
Hi,
I've been using
erldns
2.2.0 as a library (great library, by the way!)I happened to take a look into
erldns_zone_cache:put_zone/1
and, if the cache works the way I superficially understood it to, there appears to be race condition between invokingdelete_zone_records/1
andput_zone/2
. https://github.com/dnsimple/erldns/blob/97d2b8ec029f89eec4adb5f49af6d241d457bf86/src/erldns_zone_cache.erl#L277-L283Did I understood it correctly? Is there a tiny window where lookups might fail every time
put_zone/1
is used? If so, would you be open to changing the order between calls? I'd be available for a PR.Thanks!