moby/libnetwork/internal/kvstore
Albin Kerouanton cbd45e83cf libnet: Replace DeleteAtomic in retry loops with DeleteIdempotent
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>
2024-02-22 08:22:09 +01:00
..
boltdb libnet: Replace DeleteAtomic in retry loops with DeleteIdempotent 2024-02-22 08:22:09 +01:00
kvstore.go libnet: Replace DeleteAtomic in retry loops with DeleteIdempotent 2024-02-22 08:22:09 +01:00