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

Rotate record file before writing new log. #3158

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

mint570
Copy link
Contributor

@mint570 mint570 commented May 22, 2024

What I did
Rotate file before writing the log for record files.

Why I did it
If we configure logrotate to compress, the old file stream will write to void after the old file is rotated and compressed. This PR changes the order of write and rotate. It will always rotate first and then write. There might still be log lost if logrotate sends HUP signal too late.

How I verified it
N/A

Details if related
N/A

@mint570 mint570 requested a review from prsunny as a code owner May 22, 2024 01:00
Change-Id: Id04c25b3f7f09681adc7f7ab26973f7784ebe9ba
@prsunny prsunny merged commit fff544e into sonic-net:master Jun 4, 2024
17 checks passed
@mint570 mint570 deleted the recorder_upstream branch June 4, 2024 22:13
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

Successfully merging this pull request may close these issues.

3 participants