mirror of
https://github.com/moby/moby.git
synced 2026-07-10 00:28:51 +00:00
A common pattern in libnetwork is to delete an object using `DeleteAtomic`, ie. to check the optimistic lock, but put in a retry loop to refresh the data and the version index used by the optimistic lock. This commit introduces a new `Delete` method to delete without checking the optimistic lock. It focuses only on the few places where it's obvious the calling code doesn't rely on the side-effects of the retry loop (ie. refreshing the object to be deleted). Signed-off-by: Albin Kerouanton <albinker@gmail.com>