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

Legacy Retention Strategies should not allow Max number of indices to be lower then 1 #21552

Open
kodjo-anipah opened this issue Feb 6, 2025 · 0 comments

Comments

@kodjo-anipah
Copy link
Contributor

Configuring the max number of indices to 0 leads to errors during retention.
Index Time & Index Message Count retention strategies are affected.

Expected Behavior

It should not be possible to set a value for the max number of indices to something lower than 1

Current Behavior

At some point, retention stops working at all since we always run into this exception:

2025-02-06 11:26:26,598 INFO : org.graylog2.indexer.retention.executors.CountBasedRetentionExecutor - Number of indices (2) higher than limit (0). Running retention for 2 indices.
2025-02-06 11:26:26,605 ERROR: org.graylog2.periodical.IndexRetentionThread - Uncaught exception in Periodical
java.lang.IllegalArgumentException: -1
	at java.base/java.util.stream.ReferencePipeline.skip(ReferencePipeline.java:575) ~[?:?]

Steps to Reproduce (for bugs)

  1. Configure an index to Index Time Retention strategy and max number of indices to 0
  2. Restart your Graylog server
  3. See retention breaking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants