File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -409,19 +409,26 @@ bool OrchDaemon::warmRestoreAndSyncUp()
409409 }
410410
411411 /*
412- * First iteration is to handle all the existing data in predefined order.
413- */
414- for (Orch *o : m_orchList)
415- {
416- o->doTask ();
417- }
418- /*
419- * Drain remaining data that are out of order like LAG_MEMBER_TABLE and VLAN_MEMBER_TABLE
420- * since they were checked before LAG_TABLE and VLAN_TABLE.
412+ * Three iterations are needed.
413+ *
414+ * First iteration: Orch(s) which do not have dependency on port table,
415+ * gBufferOrch, gPortsOrch(Port table and VLAN table),
416+ * and orch(s) which have dependency on Port but processed after it.
417+ *
418+ * Second iteration: gBufferOrch (has inter-dependency with gPortsOrch),
419+ * remaining attributes on port table for gPortsOrch,
420+ * gIntfsOrch which has dependency on both gBufferOrch and port table of gPortsOrch.
421+ * LAG_TABLE in gPortsOrch.
422+ *
423+ * Third iteration: Drain remaining data that are out of order like LAG_MEMBER_TABLE and
424+ * VLAN_MEMBER_TABLE since they were checked before LAG_TABLE and VLAN_TABLE within gPortsOrch.
421425 */
422- for (Orch *o : m_orchList )
426+ for (auto it = 0 ; it < 3 ; it++ )
423427 {
424- o->doTask ();
428+ for (Orch *o : m_orchList)
429+ {
430+ o->doTask ();
431+ }
425432 }
426433
427434 /*
You can’t perform that action at this time.
0 commit comments