-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Race in [3rd-party] rotor-appender #168
Comments
Hi Mike, thanks for the report. I'm not involved with any of the 3rd-party appenders and have my hands pretty full atm but would be happy to see a PR that protects against the race condition. (E.g. a simple atom to help lock rotation). Cheers! :-) |
Decided to just handle this myself quickly, thanks again for the report - cheers! |
Also add tests for this.
Ups, sorry, didn't see this until now. Might still find the test useful. |
No problem, appreciate the PR - thanks! |
We're seeing truncation of log files with rotor-appender.
It seems there's an obvious race when logging is done from multiple threads:
If multiple invocations of
rotate-logs
run concurrently (actually quite probable), then one might delete the logs the other just shifted into the position of the oldest log.I suggest setting
async?
totrue
.The text was updated successfully, but these errors were encountered: