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

Concurrent scenarios should wait for the state file to release the lock, not directly fail. #541

Open
banjiuqingshan opened this issue Aug 12, 2023 · 1 comment

Comments

@banjiuqingshan
Copy link

After f46d0bd, concurrent logrotate tasks will fail if status file is not specified.Exclusive access to the state file is indeed necessary.However, in the default scenario, waiting for the last logrotate task to complete is better than returning a failure message.In addition, if different state files are configured with the same log, the current locking mechanism does not seem to be able to avoid concurrent dumps of logs.

@kdudka
Copy link
Member

kdudka commented Aug 14, 2023

There is already the --wait-for-state-lock option for this and I think it is obvious from the man page why it is not the default behavior. See #457 for the context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants