mirror of https://github.com/hashicorp/consul
Browse Source
Deleting from memdb inside an interation can cause a panic from Iterator.Next. This case is technically safe (for now) because the iterator is using the root radix tree not a modified one. However this could break at any time if someone adds an insert or delete to the coordinates table before this place in the function. It also sets a bad example, because generally deletes in an interator are not safe. So this commit uses the pattern we have in other places to move the deletes out of the iteration.pull/9591/head
Daniel Nephin
4 years ago
1 changed files with 4 additions and 0 deletions
Loading…
Reference in new issue