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

Ignore reopened indices for count-based retention strategies. #3321

Merged
merged 4 commits into from Jan 9, 2017
Merged

Conversation

@dennisoelkers
Copy link
Member

@dennisoelkers dennisoelkers commented Jan 9, 2017

Before this change, reopening a closed index while a count-based
retention strategy is configured leads to:

a) a possible higher server log volume, as the index count is probably
higher than the configured limit, but a reopened index is ignored during
retention

b) an incorrect number of indices being deleted, as reopened indices
are counted against the maximum number of indices, but ignored during
retention

With this change, reopened indices are being filtered out when
determining the number of current indices which is compared against the
maxmimum number of indices and when building the list of indices to
delete during retention.

Fixes #2405, #3297.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
Before this change, reopening a closed index while a count-based
retention strategy is configured leads to:

a) a possible higher server log volume, as the index count is probably
higher than the configured limit, but a reopened index is ignored during
retention

b) an incorrect number of indices being deleted, as reopened indices
are counted against the maximum number of indices, but ignored during
retention

With this change, reopened indices are being filtered out when
determining the number of current indices which is compared against the
maxmimum number of indices _and_ when building the list of indices to
delete during retention.

Fixes #2405, #3297.
@dennisoelkers dennisoelkers added the bug label Jan 9, 2017
@dennisoelkers dennisoelkers added this to the 2.2.0 milestone Jan 9, 2017
@joschi joschi self-assigned this Jan 9, 2017
@joschi
joschi approved these changes Jan 9, 2017
@joschi joschi merged commit 765e7aa into master Jan 9, 2017
4 checks passed
4 checks passed
ci-web-linter Jenkins build graylog-pr-linter-check 1258 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
@joschi joschi deleted the issue-3297 branch Jan 9, 2017
@joschi joschi removed the ready-for-review label Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.