From f3cc85ce2e5fbbdccf1f2eaf760e8e68fbbb43e7 Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Fri, 24 Jan 2020 14:11:50 +0200 Subject: [PATCH] [#1040] address review --- src/lib/dhcpsrv/alloc_engine.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/dhcpsrv/alloc_engine.cc b/src/lib/dhcpsrv/alloc_engine.cc index f0514aebf3..5c2a1e6883 100644 --- a/src/lib/dhcpsrv/alloc_engine.cc +++ b/src/lib/dhcpsrv/alloc_engine.cc @@ -1475,6 +1475,8 @@ AllocEngine::removeNonmatchingReservedLeases6(ClientContext6& ctx, // Remove this lease from LeaseMgr as it is reserved to someone // else or doesn't belong to a pool. if (!LeaseMgrFactory::instance().deleteLease(candidate)) { + // Concurrent delete performed by other instance which should + // properly handle dns and stats updates. continue; } @@ -1520,6 +1522,8 @@ AllocEngine::removeNonmatchingReservedNoHostLeases6(ClientContext6& ctx, // Remove this lease from LeaseMgr as it doesn't belong to a pool. if (!LeaseMgrFactory::instance().deleteLease(candidate)) { + // Concurrent delete performed by other instance which should + // properly handle dns and stats updates. continue; } @@ -1589,6 +1593,8 @@ AllocEngine::removeNonreservedLeases6(ClientContext6& ctx, // We have reservations, but not for this lease. Release it. // Remove this lease from LeaseMgr if (!LeaseMgrFactory::instance().deleteLease(*lease)) { + // Concurrent delete performed by other instance which should + // properly handle dns and stats updates. continue; } @@ -1991,6 +1997,8 @@ AllocEngine::extendLease6(ClientContext6& ctx, Lease6Ptr lease) { // Remove this lease from LeaseMgr if (!LeaseMgrFactory::instance().deleteLease(lease)) { + // Concurrent delete performed by other instance which should + // properly handle dns and stats updates. return; }