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 a problem with a random rotation strategy order #12247

Merged
merged 2 commits into from Mar 9, 2022

Conversation

luk-kaminski
Copy link
Contributor

@luk-kaminski luk-kaminski commented Mar 8, 2022

Description

Fixes #12246
Rotation strategies are returned in the same order in /system/indices/rotation/strategies endpoint.
TimeBasedRotationStrategy is the first/default one if nothing is configured in graylog.conf file.
Validator for "enabled_index_rotation_strategies" will not allow to put duplicates in this property.

Motivation and Context

Every time the Create Index Set page was opened, the Index Rotation Configuration gets randomly selected from provided 3 options. It was caused by the fact that back-end returned the strategies in random order.

How Has This Been Tested?

  1. Open the System -> Indices page
  2. Click on the Create Index Set button
  3. Verify which rotation strategy is selected
  4. Refresh the page and verify again what strategy is pre-selected now

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • 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.

…ration. TimeBaseRotationStrategy becomes the default one.
Copy link
Contributor

@todvora todvora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks perfect!

@todvora todvora merged commit 7081f73 into master Mar 9, 2022
@todvora todvora deleted the bug_random_rotation_strategy_order branch March 9, 2022 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Index Set page randomly selects rotation strategy
2 participants