From: Francis Dupont Date: Thu, 21 May 2020 16:48:33 +0000 (+0200) Subject: [#1147] Improved lost race comments X-Git-Tag: Kea-1.7.9~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa5af6357ee6693698286d9d6583e71e58fe8061;p=thirdparty%2Fkea.git [#1147] Improved lost race comments --- diff --git a/src/hooks/dhcp/lease_cmds/lease_cmds.cc b/src/hooks/dhcp/lease_cmds/lease_cmds.cc index e171385acb..20f9aa8898 100644 --- a/src/hooks/dhcp/lease_cmds/lease_cmds.cc +++ b/src/hooks/dhcp/lease_cmds/lease_cmds.cc @@ -1175,7 +1175,8 @@ void updateOrAdd(Lease6Ptr lease) { } catch (const NoSuchLease& ex) { // Lease to be updated not found, so add it. if (!LeaseMgrFactory::instance().addLease(lease)) { - isc_throw(db::DuplicateEntry, "update then add lost race"); + isc_throw(db::DuplicateEntry, + "lost race between calls to update and add"); } } } @@ -1446,7 +1447,8 @@ namespace { // anonymous namepace. bool addOrUpdate4(Lease4Ptr lease, bool force_create) { if (force_create && !LeaseMgrFactory::instance().getLease4(lease->addr_)) { if (!LeaseMgrFactory::instance().addLease(lease)) { - isc_throw(db::DuplicateEntry, "get then add lost race"); + isc_throw(db::DuplicateEntry, + "lost race between calls to get and add"); } return (true); } @@ -1515,7 +1517,8 @@ bool addOrUpdate6(Lease6Ptr lease, bool force_create) { if (force_create && !LeaseMgrFactory::instance().getLease6(lease->type_, lease->addr_)) { if (!LeaseMgrFactory::instance().addLease(lease)) { - isc_throw(db::DuplicateEntry, "get then add lost race"); + isc_throw(db::DuplicateEntry, + "lost race between calls to get and add"); } return (true); }