Skip to content

FLUME-3341 Fix:Taildir source may cause file handle leak and data duplication #295

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

Open
wants to merge 1 commit into
base: flume-1.8
Choose a base branch
from

Conversation

edricming
Copy link

As is described in Flume-3342, renaming a file may cause data duplication. But moreover, if the original file was opened by flume before and not closed yet, flume reopens it while not freeing its original file handles. And then I delete the new file, but after the idle time, flume just closes the new file handle and forgets to close its original file handles, leading to a handle leak. It can be found by "lsof | grep "deleted".

This bug is triggered by using Log4j to roll log files. To avoid losing data when rolling, I use regex to include both current log file and old log files in the taildir path.

Fix:Taildir source may cause file handle leak and data duplication
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.

1 participant