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

Ignore duplicated inotify events #1244

Merged
merged 2 commits into from
Oct 5, 2016

Conversation

okkez
Copy link
Contributor

@okkez okkez commented Sep 27, 2016

This change can avoid occasional failure against test_rotate_xxx.

@repeatedly
Copy link
Member

"test: should output plain text when compress option is default(text)(FileOutputSecondaryTest::write)" test fails but in_tail test seems stable.
We re-run test more times.

@tagomoris
Copy link
Member

I requested rebuild on TravisCI, and found the failure.
https://travis-ci.org/fluent/fluentd/jobs/163013161

@okkez
Copy link
Contributor Author

okkez commented Sep 28, 2016

Hmm, this approach may be wrong...
I will try another approach.

@okkez okkez force-pushed the in_tail-fix-on-rotate branch from 48c3f48 to d31adde Compare September 28, 2016 08:55
@tagomoris
Copy link
Member

LGTM. I'm requesting rebuild (2nd time).
@repeatedly ?

@repeatedly
Copy link
Member

I will check this change manually.
After that, I wll merge it.

@repeatedly
Copy link
Member

@okkez Could you rebase this patch?
master branch includes several fixes for other unstable tests.

If watcher has been already updated by other inotify event.
This change can avoid occasional failure against `test_rotate_xxx`.
@okkez okkez force-pushed the in_tail-fix-on-rotate branch from d31adde to 566e50c Compare October 1, 2016 06:52
@okkez
Copy link
Contributor Author

okkez commented Oct 1, 2016

Rebased and pushed changes.

@okkez
Copy link
Contributor Author

okkez commented Oct 3, 2016

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
Copy link
Member

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.

Copy link
Contributor Author

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.
@repeatedly repeatedly merged commit a61d8a8 into fluent:master Oct 5, 2016
@repeatedly
Copy link
Member

Thanks!

@okkez okkez deleted the in_tail-fix-on-rotate branch October 5, 2016 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants