Skip to content

Try to fix the non-deterministic replay by making the ordering of maps and sets deterministic #1274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 20, 2017

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Mar 19, 2017

The theory is that the computations (e.g., of barycentres) that are done in map/set order yield different results when the order changes due to vessels/parts landing at different addresses. To confirm this we'll need to build a new journal.

@pleroy
Copy link
Member Author

pleroy commented Mar 19, 2017

retest this please

bool operator()(not_null<Vessel const*> left,
not_null<Vessel const*> right) const;
};

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we name the types

std::map<not_null<Part*>, T, PartByPartIdComparator>
std::set<not_null<Vessel*>, VesselByGUIDComparator>
std::set<not_null<Vessel const*>, VesselByGUIDComparator>

they're a bit of a mouthful, and it's not like we want to mix with comparatorless maps or sets of the same.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@eggrobin eggrobin added the LGTM label Mar 20, 2017
@pleroy
Copy link
Member Author

pleroy commented Mar 20, 2017

retest this please

Sorry, something went wrong.

@pleroy pleroy merged commit 1df81a4 into mockingbirdnest:master Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants