when deleting l3 static mapping with addr_only,
[vpp.git] / src / vpp-api / vom / om.cpp
index f82fee3..edfc046 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <algorithm>
 
+#include "vom/logger.hpp"
 #include "vom/om.hpp"
 
 namespace VOM {
@@ -49,9 +50,9 @@ void
 OM::sweep(const client_db::key_t& key)
 {
   /*
- * Find if the object already stored on behalf of this key.
- * and mark them stale
- */
  * Find if the object already stored on behalf of this key.
  * and mark them stale
  */
   object_ref_list& objs = m_db->find(key);
 
   for (auto it = objs.begin(); it != objs.end();) {
@@ -69,11 +70,11 @@ void
 OM::remove(const client_db::key_t& key)
 {
   /*
- * Simply reset the list for this key. This will desctruct the
- * object list and shared_ptrs therein. When the last shared_ptr
- * goes the objects desctructor is called and the object is
- * removed from OM
- */
  * Simply reset the list for this key. This will desctruct the
  * object list and shared_ptrs therein. When the last shared_ptr
  * goes the objects desctructor is called and the object is
  * removed from OM
  */
   m_db->flush(key);
 
   HW::write();
@@ -82,14 +83,14 @@ OM::remove(const client_db::key_t& key)
 void
 OM::replay()
 {
+  VOM_LOG(log_level_t::INFO) << "replay";
   /*
- * the listeners are sorted in dependency order
- */
  * the listeners are sorted in dependency order
  */
   for (listener* l : *m_listeners) {
     l->handle_replay();
+    HW::write();
   }
-
-  HW::write();
 }
 
 void
@@ -107,16 +108,18 @@ OM::dump(std::ostream& os)
 void
 OM::populate(const client_db::key_t& key)
 {
+  VOM_LOG(log_level_t::INFO) << "populate";
+
   /*
- * the listeners are sorted in dependency order
- */
  * the listeners are sorted in dependency order
  */
   for (listener* l : *m_listeners) {
     l->handle_populate(key);
   }
 
   /*
- * once we have it all, mark it stale.
- */
  * once we have it all, mark it stale.
  */
   mark(key);
 }