Skip to content
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

Ordering of log messages with identical timestamp #223

Closed
aboulart opened this issue Jan 12, 2023 · 1 comment · Fixed by #224
Closed

Ordering of log messages with identical timestamp #223

aboulart opened this issue Jan 12, 2023 · 1 comment · Fixed by #224
Labels
bug Something isn't working

Comments

@aboulart
Copy link

When using a custom clock for simulated time, it's possible for multiple log events from 1 thread to have exactly the same timestamp.

They then get re-sorted by the backend worker thread, which doesn't maintain relative ordering of events retrieved from the same queue. So sequential events from 1 thread appear in a different order, which seems wrong.

A simple fix is to add a sequence number to the key of the std::priority_queue used for re-ordering events.

@odygrd odygrd added the bug Something isn't working label Jan 13, 2023
@odygrd odygrd linked a pull request Jan 13, 2023 that will close this issue
@odygrd
Copy link
Owner

odygrd commented Jan 13, 2023

Thanks a lot for reporting this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants