Skip to content

Commit

Permalink
[orchdaemon]: Fixed sairedis record file rotation
Browse files Browse the repository at this point in the history
What I did
Fix sonic-net/sonic-buildimage#8162

Moved sairedis record file rotation logic out of flush() to fix issue.

Why I did it
Sairedis record file was not releasing the file handle on rotation. This is because the file handle release was inside the flush() which was only being called if a select timeout was triggered. Moved the logic to its own function which is called in the start() loop.

How I verified it
Ran a script to fill log and verified that rotation was happening correctly.

Signed-off-by: Bryan Crossland bryan.crossland@target.com
  • Loading branch information
bacrossland committed Oct 4, 2022
1 parent 6dc03d3 commit 54168d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions orchagent/orchdaemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <sairedis.h>

using namespace swss;
extern bool gSaiRedisLogRotate;

class OrchDaemon
{
Expand Down

0 comments on commit 54168d7

Please sign in to comment.