Fixes a regression in core where @SingleThread annotated processors are only running the last instance.#5902
Merged
dlvenable merged 3 commits intoopensearch-project:mainfrom Jul 25, 2025
Conversation
…re only running the last instance. Fixes opensearch-project#5901 Signed-off-by: David Venable <dlv@amazon.com>
kkondaka
reviewed
Jul 25, 2025
|
|
||
| public BasicEventsTrackingTestProcessor() { | ||
| super(PLUGIN_NAME, PROCESSED_EVENTS_MAP); | ||
| super(PLUGIN_NAME, PROCESSED_EVENTS_MAP, -1); |
Member
Author
There was a problem hiding this comment.
We don't track it for this processor. I made this a static final with a name to add clarity.
kkondaka
reviewed
Jul 25, 2025
| } | ||
| } | ||
| ).collect(Collectors.toList()); | ||
| final ProcessorRegistry processorRegistry = new ProcessorRegistry(processors); |
Collaborator
There was a problem hiding this comment.
Why same name as the class member?
Member
Author
There was a problem hiding this comment.
Good call. I renamed this as well as some other fields to try to add clarity.
Signed-off-by: David Venable <dlv@amazon.com>
graytaylor0
previously approved these changes
Jul 25, 2025
…t completed. Signed-off-by: David Venable <dlv@amazon.com>
graytaylor0
approved these changes
Jul 25, 2025
kkondaka
approved these changes
Jul 25, 2025
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Jul 25, 2025
…re only running the last instance. (#5902) Fixes a regression in core where @SingleThread annotated processors are only running the last instance. Also, disable the ProcessorSwapPipelineIT test since this feature is not yet completed. Fixes #5901 Signed-off-by: David Venable <dlv@amazon.com> (cherry picked from commit 53f16d7)
dlvenable
added a commit
that referenced
this pull request
Jul 28, 2025
…re only running the last instance. (#5902) (#5904) Fixes a regression in core where @SingleThread annotated processors are only running the last instance. Also, disable the ProcessorSwapPipelineIT test since this feature is not yet completed. Fixes #5901 (cherry picked from commit 53f16d7) Signed-off-by: David Venable <dlv@amazon.com> Co-authored-by: David Venable <dlv@amazon.com>
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
This reworks the recent code for the
ProcessorProviderto create a provider per processor thread.With this fix, the processor swaps will not work correctly, but this is not complete anyway.
New integration test
This includes an integration test which fails on
main.The test exactly shows what I expected to see, which is that the last processor instance is used by all threads.
Issues Resolved
Resolves #5901
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.