Comment 4 for bug 1886969

Revision history for this message
Boyvinall (boyvinall) wrote :

Actually, I guess the alternative to a lock is simply to iterate through the `to_reload` list/dict and delete any item there from `_network_bulk_allocations`. I can see the history of this code is very sensitive to locks, certainly we've seen problems with the dhcp agent rabbit queues building up. My thinking was that the locks I've put in there were held only for a very short period of time, so probably ok. The code you had above is sensitive to a race hazard if a new item is set in `_network_bulk_allocations` inbetween copying and clearing it.