-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Ignore duplicated inotify events #1244
Conversation
"test: should output plain text when compress option is default(text)(FileOutputSecondaryTest::write)" test fails but in_tail test seems stable. |
I requested rebuild on TravisCI, and found the failure. |
Hmm, this approach may be wrong... |
48c3f48
to
d31adde
Compare
LGTM. I'm requesting rebuild (2nd time). |
I will check this change manually. |
@okkez Could you rebase this patch? |
If watcher has been already updated by other inotify event. This change can avoid occasional failure against `test_rotate_xxx`.
d31adde
to
566e50c
Compare
Rebased and pushed changes. |
Failed test on AppVeyor is not related to my changes. |
@@ -248,6 +248,10 @@ def stop_watchers(paths, immediate = false, unwatched = false) | |||
|
|||
# refresh_watchers calls @tails.keys so we don't use stop_watcher -> start_watcher sequence for safety. | |||
def update_watcher(path, pe) | |||
unless pe.read_inode == @pf[path].read_inode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, @pf
check is needed?
@pf is nil
when pos_file
option is not specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Thank you!
I will add a change for this.
Because `@pf` is `nil` when `pos_file` option is not specified.
Thanks! |
This change can avoid occasional failure against
test_rotate_xxx
.