Closed timower closed 6 years ago
The issue has been verified.
Patched in https://github.com/CaringCaribou/caringcaribou/commit/ad6b145a7e8ff3c777c57852b9271ee2f754e873 - if the delay is smaller than 0, the delay will simply be ignored. Can you verify that this resolves the issue on your end as well?
Yes, works better now! Still seems strange, either the timestamp is wrong or the order in the file is wrong. Both of which indicate a bug no?
The dump module previously ran a callback function which wrote to the dump file in a separate thread for each incoming message. Due to this, race conditions could occur; causing messages to be handled and logged in the wrong order.
This should no longer happen after changes introduced in https://github.com/CaringCaribou/caringcaribou/commit/59a9bee4e1d07664317ec472f4c6fc3cafddc6dc, where the handling of incoming messages was refactored to run sequentially in a single thread instead.
To summarize the difference in behavior:
As such, the race condition which could cause messages to end up in the wrong order in the dump file should already be solved. Feel free to open a new issue if you encounter anything strange related to this.
While I was sending a dump file I got a python exception that sleep requested negative delays. When I searched the output file, I found that the difference between the timestamp of some lines was indeed negative.
For example: