@@ -113,17 +113,17 @@ bool MirrorOrch::bake()
113
113
}
114
114
}
115
115
116
- if (! active)
116
+ if (active)
117
117
{
118
- continue ;
119
- }
118
+ SWSS_LOG_NOTICE ( " Found mirror session %s active before warm reboot " ,
119
+ key. c_str ());
120
120
121
- SWSS_LOG_NOTICE (" Found mirror session %s active before warm reboot" ,
122
- key.c_str ());
121
+ // Recover saved active session's monitor port
122
+ m_recoverySessionMap.emplace (
123
+ key, monitor_port + state_db_key_delimiter + next_hop_ip);
124
+ }
123
125
124
- // Recover saved active session's monitor port
125
- m_recoverySessionMap.emplace (
126
- key, monitor_port + state_db_key_delimiter + next_hop_ip);
126
+ removeSessionState (key);
127
127
}
128
128
129
129
return Orch::bake ();
@@ -382,6 +382,8 @@ void MirrorOrch::deleteEntry(const string& name)
382
382
m_policerOrch->decreaseRefCount (session.policer );
383
383
}
384
384
385
+ removeSessionState (name);
386
+
385
387
m_syncdMirrors.erase (sessionIter);
386
388
387
389
SWSS_LOG_NOTICE (" Removed mirror session %s" , name.c_str ());
@@ -436,6 +438,13 @@ void MirrorOrch::setSessionState(const string& name, const MirrorEntry& session,
436
438
m_mirrorTable.set (name, fvVector);
437
439
}
438
440
441
+ void MirrorOrch::removeSessionState (const string& name)
442
+ {
443
+ SWSS_LOG_ENTER ();
444
+
445
+ m_mirrorTable.del (name);
446
+ }
447
+
439
448
bool MirrorOrch::getNeighborInfo (const string& name, MirrorEntry& session)
440
449
{
441
450
SWSS_LOG_ENTER ();
0 commit comments