diff options
author | Razvan Becheriu <razvan@isc.org> | 2024-04-02 07:31:46 +0200 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2024-04-02 07:31:46 +0200 |
commit | e6e0b34aef1ac9861def3111e08d701aa1a711df (patch) | |
tree | 20e37f0575feef4acc250140ab8902253578b0c3 /src | |
parent | [#3295] Improve pickNextJob efficiency (diff) | |
download | kea-e6e0b34aef1ac9861def3111e08d701aa1a711df.tar.xz kea-e6e0b34aef1ac9861def3111e08d701aa1a711df.zip |
[#3295] addressed review
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/d2/d2_update_mgr.cc | 6 | ||||
-rw-r--r-- | src/bin/d2/d2_update_mgr.h | 4 | ||||
-rw-r--r-- | src/bin/d2/tests/d2_update_mgr_unittests.cc | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/bin/d2/d2_update_mgr.cc b/src/bin/d2/d2_update_mgr.cc index 6be805b473..711d3a9ae3 100644 --- a/src/bin/d2/d2_update_mgr.cc +++ b/src/bin/d2/d2_update_mgr.cc @@ -60,7 +60,7 @@ void D2UpdateMgr::sweep() { // start one new transaction per invocation. On the other hand a busy // system will generate many IO events and this method will be called // frequently. It will likely achieve max transactions quickly on its own. - if (getQueueCount() > 0) { + if (getQueueCount() > 0) { if (getTransactionCount() >= max_transactions_) { LOG_DEBUG(dhcp_to_d2_logger, isc::log::DBGLVL_TRACE_DETAIL_DATA, DHCP_DDNS_AT_MAX_TRANSACTIONS).arg(getQueueCount()) @@ -88,7 +88,7 @@ D2UpdateMgr::checkFinishedTransactions() { while (it != transaction_list_.end()) { NameChangeTransactionPtr trans = (*it).second; if (trans->isModelDone()) { - // @todo Additional actions based on NCR status could be + // @todo Additional actions based on NCR status could be // performed here. transaction_list_.erase(it++); } else { @@ -100,7 +100,7 @@ D2UpdateMgr::checkFinishedTransactions() { void D2UpdateMgr::pickNextJob() { // Start at the front of the queue, looking for the first entry for // which no transaction is in progress. If we find an eligible entry - // remove it from the queue and make a transaction for it. If the + // remove it from the queue and make a transaction for it. If the // transaction creation fails try the next entry in the queue. // Requests and transactions are associated by DHCID. If a request has // the same DHCID as a transaction, they are presumed to be for the same diff --git a/src/bin/d2/d2_update_mgr.h b/src/bin/d2/d2_update_mgr.h index 870440144c..ee2cdd0bf3 100644 --- a/src/bin/d2/d2_update_mgr.h +++ b/src/bin/d2/d2_update_mgr.h @@ -46,7 +46,7 @@ typedef std::map<TransactionKey, NameChangeTransactionPtr> TransactionList; /// transactions. /// /// As part of the process of forming transactions, D2UpdateMgr matches each -/// request with the appropriate list of DNS servers. This matching is based +/// request with the appropriate list of DNS servers. This matching is based /// upon request attributes, primarily the FQDN and update direction (forward /// or reverse). D2UpdateMgr uses the services of D2CfgMgr to match requests /// to DNS server lists. @@ -54,7 +54,7 @@ typedef std::map<TransactionKey, NameChangeTransactionPtr> TransactionList; /// Once created, each transaction is responsible for carrying out the steps /// required to fulfill its specific request. These steps typically consist of /// one or more DNS packet exchanges with the appropriate DNS server. As -/// transactions complete, D2UpdateMgr removes them from the transaction list, +/// transactions complete, D2UpdateMgr removes them from the transaction list, /// replacing them with new transactions. /// /// D2UpdateMgr carries out each of the above steps, with a method called diff --git a/src/bin/d2/tests/d2_update_mgr_unittests.cc b/src/bin/d2/tests/d2_update_mgr_unittests.cc index ec8a2d957b..0360a299c8 100644 --- a/src/bin/d2/tests/d2_update_mgr_unittests.cc +++ b/src/bin/d2/tests/d2_update_mgr_unittests.cc @@ -133,7 +133,7 @@ public: " \"ddns-domains\": [ " " { \"name\": \"example.com.\" , " " \"dns-servers\" : [ " - " { \"ip-address\": \"127.0.0.1\", \"port\" : 5301 } " + " { \"ip-address\": \"127.0.0.1\", \"port\" : 5301 } " " ] }," " { \"name\": \"org.\" , " " \"dns-servers\" : [ " @@ -241,7 +241,7 @@ public: // test (currently, multiTransactionTimeout). if (passes > max_passes) { FAIL() << "processALL failed, too many passes: " - << passes << ", total handlers executed: " << handlers; + << passes << ", total handlers executed: " << handlers; } } } @@ -293,7 +293,7 @@ TEST(D2UpdateMgr, construction) { update_mgr->getMaxTransactions()); - // Verify that constructor permits custom max transactions. + // Verify that constructor permits custom max transactions. ASSERT_NO_THROW(update_mgr.reset(new D2UpdateMgr(queue_mgr, cfg_mgr, io_service, 100))); @@ -530,7 +530,7 @@ TEST_F(D2UpdateMgrTest, pickNextJob) { // Verify that the queue has been drained. EXPECT_EQ(0, update_mgr_->getQueueCount()); - // Now verify that a subsequent request for a DCHID for which a + // Now verify that a subsequent request for a DCHID for which a // transaction is in progress, is not dequeued. // First add the "subsequent" request. dhcp_ddns::NameChangeRequestPtr |