-
Notifications
You must be signed in to change notification settings - Fork 87
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
Deterministic ordering of competing messages #506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me after the changes.
Passing around the Client
is not ideal but I don't think we can get around that without fetching all milestones up-front, which is a lot more expensive in general.
Minor comments about errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good to me. I agree with what @cycraig said regarding MilestoneError
though.
Description of change
Ordering message now is implemented according to the specs, namely:
If two or more root documents, integration documents or diff documents compete in the chain. Eg. 2 integration message have the same
previous_message_id
they will be sorted according to the milestone that references them. If both messages have the same milestone, they will be alphabetically ordered according based on theirMessageId
.Note: Milestone ordering only happens if two or more message compete in the chain!
Links to any relevant issues
fixes issue #480
Type of change