Add endpoint for rotating multiple index sets - #26802
Open
moesterheld wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a bulk deflector cycling endpoint to rotate multiple index sets in one request, primarily to support upgrade flows (e.g., OpenSearch incompatible indices handling) while reusing the existing bulk-operation infrastructure.
Changes:
- Add
POST /system/deflector/bulk_cycleendpoint executing per-index-set cycling with aggregatedBulkOperationResponse. - Refactor single-index-set cycle to share the same inner execution path used by the bulk executor.
- Add cluster proxy (
/cluster/deflector/bulk_cycle) and a Retrofit remote interface method, plus a dedicated unit test for the new bulk behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
graylog2-server/src/test/java/org/graylog2/rest/resources/system/DeflectorResourceTest.java |
Adds unit tests covering success/failure aggregation, empty request rejection, and permission failures for bulkCycle. |
graylog2-server/src/main/java/org/graylog2/shared/rest/resources/system/RemoteDeflectorResource.java |
Introduces Retrofit client method for the new bulk-cycle endpoint (needs Retrofit @Body annotation fix). |
graylog2-server/src/main/java/org/graylog2/rest/resources/system/DeflectorResource.java |
Adds the bulk-cycle REST endpoint backed by SequentialBulkExecutor and shared cycleInner. |
graylog2-server/src/main/java/org/graylog2/rest/resources/cluster/ClusterDeflectorResource.java |
Adds cluster-level proxy endpoint for bulk cycling (currently does not return the bulk result). |
Comments suppressed due to low confidence (1)
graylog2-server/src/main/java/org/graylog2/rest/resources/cluster/ClusterDeflectorResource.java:81
- Method name
bulkcycleviolates Java lowerCamelCase conventions and is inconsistent withcycle(...)/cycleIndexSet(...)in the same class. Rename tobulkCyclefor readability (endpoint path is unaffected).
public void bulkcycle(@Parameter(name = "Entities to cycle", required = true) final BulkOperationRequest bulkOperationRequest) throws IOException {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
moesterheld
marked this pull request as ready for review
July 28, 2026 12:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds bulk action for rotating mulitple index sets.
Motivation and Context
needed for incompatible indices handling on OpenSearch upgrade page
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: