Code review comment for lp:~jamesodhunt/upstart/bug-1199778

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

So deserialisation of all conf sources/events/sessions has this:
> FOO_init ();
> nih_assert (NIH_LIST_EMPTY (all_foos));

I'm not sure why these asserts are present, yet all other objects don't have them.

I don't think those asserts in confsources/events/session should be present at all, although it's unexpected for those objects to be populated _at the moment_ (or only be populated with objects with certain properties) we shouldn't assert and still continue to deserialise objects.

Why are conf_sources, sessions, events asserted at _deserialise_all? Can we simply ditch all three nih_assert (NIH_LIST_EMPTY (conf_sources|events|sessions))?

(there are circular dependencies in deserialisation, and we break the loops, but it should be valid to refactor and change the order of deserialisation without triggering asserts which depend on the deserialisation order)

review: Needs Information

« Back to merge proposal