You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by GitBox <gi...@apache.org> on 2019/08/23 10:12:54 UTC

[GitHub] [flume] winway opened a new pull request #297: FLUME-3320 Fix:Taildir source reset position bug

winway opened a new pull request #297: FLUME-3320 Fix:Taildir source reset position bug
URL: https://github.com/apache/flume/pull/297
 
 
   Taildir source has chance to reset position to 0 incorrectly, so data while be duplicated. When log rotate happens just in time so that f and tf are not the same file in between code.
   `            if (f.length() < tf.getPos() && tf.getPath().equals(f.getAbsolutePath())) {
                 logger.info("Pos " + tf.getPos() + " is larger than file size! "
                     + "Restarting from pos 0, file: " + tf.getPath() + ", inode: " + inode);
                 tf.updatePos(tf.getPath(), inode, 0);
               }
   `

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services