You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very occasionally (about once every six months or so) I have a host go out of disk because logrotate has rotated the log file but MonitoringFileHandler fails to notice.
I think I have found the cause of this. Currently, in emit, _query_fd is called twice: once before writing out to the file and again after. If the rotation happens to happen between these two points, the change won't be noticed because the new self._last_stat will already have been computed before the "before" value is stashed before the first call.
I think that the call to _query_fd in the constructor should also be removed, or at least the default value of delay should be changed to True for the MonitoringFileHandler.
I can't think of a clean way to write a test demonstrating this bug; if anyone has a good idea, I'd be happy to hear it.
The text was updated successfully, but these errors were encountered:
Very occasionally (about once every six months or so) I have a host go out of disk because logrotate has rotated the log file but MonitoringFileHandler fails to notice.
I think I have found the cause of this. Currently, in
emit
,_query_fd
is called twice: once before writing out to the file and again after. If the rotation happens to happen between these two points, the change won't be noticed because the newself._last_stat
will already have been computed before the "before" value is stashed before the first call.I think that the call to
_query_fd
in the constructor should also be removed, or at least the default value ofdelay
should be changed toTrue
for the MonitoringFileHandler.I can't think of a clean way to write a test demonstrating this bug; if anyone has a good idea, I'd be happy to hear it.
The text was updated successfully, but these errors were encountered: