Skip to content

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

Open
edricming wants to merge 1 commit into
apache:flume-1.8from
edricming:flume-1.8
Open

FLUME-3341 Fix:Taildir source may cause file handle leak and data duplication#295
edricming wants to merge 1 commit into
apache:flume-1.8from
edricming:flume-1.8

Conversation

@edricming

Copy link
Copy Markdown

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