You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shadow reads hosts from the configuration file into a BTreeMap keyed by their hostnames in order to have a consistent host order and preserve determinism. (Reordering hosts in the configuration file should not change the simulation.) The Manager assigns these hosts an ID given by their order in the B-tree. Shadow sometimes uses these IDs to decide the order to process things. For example the source host's ID is used as one of the comparisons in <Event as PartialOrd>::partial_cmp() to order events in the event queue.
Ideally, changing hosts' IDs should not significantly affect the simulation results. For example, if you rename a host in the Shadow config such that the new name is ordered differently relative to other hostnames, then the host will be given a different ID relative to those other hosts. Analogously, if we were to reverse the order that hosts are added to the Manager, the simulation results should not significantly change.
If we reverse the host ID order, we do see different simulation results, and several of Shadow's tests fail. We should reduce Shadow's dependence on host IDs for determinism and ensure all tests pass when the host IDs are reversed. For example, see #2568 which was a test to see what tests fail. (This isn't directly a determinism issue, but is related.)
The text was updated successfully, but these errors were encountered:
Shadow reads hosts from the configuration file into a
BTreeMap
keyed by their hostnames in order to have a consistent host order and preserve determinism. (Reordering hosts in the configuration file should not change the simulation.) TheManager
assigns these hosts an ID given by their order in the B-tree. Shadow sometimes uses these IDs to decide the order to process things. For example the source host's ID is used as one of the comparisons in<Event as PartialOrd>::partial_cmp()
to order events in the event queue.Ideally, changing hosts' IDs should not significantly affect the simulation results. For example, if you rename a host in the Shadow config such that the new name is ordered differently relative to other hostnames, then the host will be given a different ID relative to those other hosts. Analogously, if we were to reverse the order that hosts are added to the
Manager
, the simulation results should not significantly change.If we reverse the host ID order, we do see different simulation results, and several of Shadow's tests fail. We should reduce Shadow's dependence on host IDs for determinism and ensure all tests pass when the host IDs are reversed. For example, see #2568 which was a test to see what tests fail. (This isn't directly a determinism issue, but is related.)
The text was updated successfully, but these errors were encountered: