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

Set offset of files under ignore_older to file.size() #2907

Merged
merged 2 commits into from Nov 3, 2016

Commits on Nov 3, 2016

  1. Set offset of files under ignore_older to file.size()

    Until now if a file was falling under ignore_older, offset 0 was set for the file. In case the file was updated again, all content of the file would be read. This change will set the offset for files falling under ignore_older to the size of the file. This applies on start / restart for files which were not seen before.
    
    The assumption behind this change is, that files falling under ignore_older are normally not updated, and if these files are updated only the newly added lines are expected to be read no the complete file.
    
    The setting of the offset only happens once when it falls for the first time under ignore_older and no state exists. For files which were harvested and then fall under ignore_older, the offset is already file.size().
    
    As this change only applies to files without a state, this should also not have any side affects on Windows where it can happen that a file was updated but the timestamp wasn't and it falls under ignore_older. The reason it doesn't have an affect is that ignore_older only applies an offset if there is no previous state.
    ruflin committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    a516a23 View commit details
    Browse the repository at this point in the history
  2. Add doc line

    ruflin committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    f4796cc View commit details
    Browse the repository at this point in the history