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

Fix filebeat file rotation registrar issue #1281 #1375

Merged
merged 1 commit into from
Apr 18, 2016

Commits on Apr 18, 2016

  1. Fix filebeat file rotation registrar issue elastic#1281

    When multiple files were rotated at the same time, the first rotation was overwriting the states for the other rotated files. This happened because the new file directly had new content inside and the state for all the other files was fetched from disk, resetting the changes which were in memory.
    
    The problem is now fixed by not writing the state to disk every time state changes are discovered by the registrar, as it is up to the prospector to decide if these changes are the most recent ones. Now changes get written to disk every time a scan is done. The downside of this solution is that the registrar is also updated, if no changes did happen.
    
    * System test added to verify that issue is fixed
    * Closes elastic#1281
    * Refactor some variables for better sync handling and fix tests
    * Make offset private and only set it through method
    * Rename system tests to close_older as this is what is actually checked
    * Update registrar only when file was rotated or changed
    * Add test to check state between shutdown and rotation.Only update registry when changes happen.
    ruflin committed Apr 18, 2016
    Configuration menu
    Copy the full SHA
    8bbc264 View commit details
    Browse the repository at this point in the history