MzInfo deletion should be last on dematerialize
A dematerialization comes down from merge as a series of 3 batch commands
- Notify Incoming Teardown: let's us know that a full dematerialization is coming
- Recycle Nodes: tells us what nodes to recycle
- Destroy Links: tells us what links to get rid of
As a result the (1), (2), and (3) are get distinct cog tasks. This could create an issue if (1) succeeds and the others do not. This is because (1) deletes the MzInfo from the data store. If (2) or (3) fail we no longer have the associated MzInfo data to aid in recovery. The saving grace for the task itself, is that all the data needed to execute a task is contained within the task data structure (derived from MzInfo when it did exist), so the task is completely self sufficient and can be restarted in the absence of supporting MzInfo data.
A trace of cog tasks shows the potential ordering issue.
31 May 19 16:26:25.23 UTC RXeBsxFGN 0 0 plumbing blueberry.muffin.bakery jMZdsvFGN destroy-enclave [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 0 1 Canopy blueberry.muffin.bakery jMZdsvFGN RemoveServiceVtep [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 1 0 container blueberry.muffin.bakery jMZdsvFGN delete-task [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 1 1 container blueberry.muffin.bakery jMZdsvFGN delete-task [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 1 2 container blueberry.muffin.bakery jMZdsvFGN delete-task [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 2 0 container blueberry.muffin.bakery jMZdsvFGN delete [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 2 1 container blueberry.muffin.bakery jMZdsvFGN delete [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 2 2 container blueberry.muffin.bakery jMZdsvFGN delete [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 3 0 container blueberry.muffin.bakery jMZdsvFGN delete-img [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 3 1 container blueberry.muffin.bakery jMZdsvFGN delete-img [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 3 2 container blueberry.muffin.bakery jMZdsvFGN delete-img [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 4 0 container blueberry.muffin.bakery jMZdsvFGN delete-record [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 4 1 container blueberry.muffin.bakery jMZdsvFGN delete-record [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 4 2 container blueberry.muffin.bakery jMZdsvFGN delete-record [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 5 0 container blueberry.muffin.bakery jMZdsvFGN delete-ctr-ns [] true false
31 May 19 16:26:25.23 UTC RXeBsxFGN 6 0 bookkeeping blueberry.muffin.bakery jMZdsvFGN DeleteMzinfo [] true false
31 May 19 16:26:25.28 UTC lFecGviGQ 0 0 Canopy blueberry.muffin.bakery jMZdsvFGN RemoveLinks [RXeBsxFGN] true false
31 May 19 16:26:25.30 UTC Ei0BGxFsQ 0 0 NodeRecycle blueberry.muffin.bakery jMZdsvFGN n5 (a) [RXeBsxFGN lFecGviGQ] true false
31 May 19 16:26:25.30 UTC Ei0BGxFsQ 0 1 NodeRecycle blueberry.muffin.bakery jMZdsvFGN n4 (c) [RXeBsxFGN lFecGviGQ] true false
31 May 19 16:26:25.30 UTC Ei0BGxFsQ 0 2 NodeRecycle blueberry.muffin.bakery jMZdsvFGN n7 (B) [RXeBsxFGN lFecGviGQ] true false