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

[BUG] Unable to create stateful processors with multiple workers. #4660

Closed
dlvenable opened this issue Jun 25, 2024 · 1 comment · Fixed by #4661
Closed

[BUG] Unable to create stateful processors with multiple workers. #4660

dlvenable opened this issue Jun 25, 2024 · 1 comment · Fixed by #4661
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dlvenable
Copy link
Member

Describe the bug

Creating a stateful processor that requires peer forwarding does not work with multiple workers.

2024-06-25T00:02:23,474 [main] ERROR org.opensearch.dataprepper.parser.PipelineTransformer - Construction of pipeline components failed, skipping building of pipeline [service-map-pipeline] and its connected pipelines
java.lang.RuntimeException: Data Prepper 2.0 will only support a single peer-forwarder per pipeline/plugin type
	at org.opensearch.dataprepper.peerforwarder.DefaultPeerForwarderProvider.register(DefaultPeerForwarderProvider.java:42) ~[data-prepper-core-2.9.0-SNAPSHOT.jar:?]
	at org.opensearch.dataprepper.peerforwarder.LocalModePeerForwarderProvider.register(LocalModePeerForwarderProvider.java:32) ~[data-prepper-core-2.9.0-SNAPSHOT.jar:?]
	at org.opensearch.dataprepper.peerforwarder.PeerForwardingProcessorDecorator.lambda$decorateProcessors$1(PeerForwardingProcessorDecorator.java:73) ~[data-prepper-core-2.9.0-SNAPSHOT.jar:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
	at org.opensearch.dataprepper.peerforwarder.PeerForwardingProcessorDecorator.decorateProcessors(PeerForwardingProcessorDecorator.java:76) ~[data-prepper-core-2.9.0-SNAPSHOT.jar:?]
	at org.opensearch.dataprepper.parser.PipelineTransformer.lambda$buildPipelineFromConfiguration$3(PipelineTransformer.java:132) ~[data-prepper-core-2.9.0-SNAPSHOT.jar:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
	at org.opensearch.dataprepper.parser.PipelineTransformer.buildPipelineFromConfiguration(PipelineTransformer.java:137) ~[data-prepper-core-2.9.0-SNAPSHOT.jar:?]
	at org.opensearch.dataprepper.parser.PipelineTransformer.transformConfiguration(PipelineTransformer.java:99) ~[data-prepper-core-2.9.0-SNAPSHOT.jar:?]
	at org.opensearch.dataprepper.DataPrepper.<init>(DataPrepper.java:69) ~[data-prepper-core-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]

To Reproduce

  1. Edit trace_analytics_no_ssl_2x.yml by adding workers: 2 to the service-map-pipeline pipeline.
  2. Go to examples/jaeger-hotrod
  3. docker compose up -d
  4. `docker logs -f data-prepper

Expected behavior

This should work just like it used to.

Environment (please complete the following information):

Data Prepper running from main.

@dlvenable
Copy link
Member Author

I believe this was introduced by #4574.

https://github.com/opensearch-project/data-prepper/pull/4574/files#diff-82ab126c928e8f6c33e33fcdca6015c436d7df3870b9b420880f669cce2c8681R71-R76

I think the solution will be to re-use the existing peer-forwarder when the Processor instance is the same.

@dlvenable dlvenable added this to the v2.9 milestone Jun 25, 2024
dlvenable added a commit to dlvenable/data-prepper that referenced this issue Jun 25, 2024
…s fixes a bug where the service_map processor would not load in a pipeline with multiple workers. Resolves opensearch-project#4660.

Signed-off-by: David Venable <[email protected]>
dlvenable added a commit that referenced this issue Jun 25, 2024
…s fixes a bug where the service_map processor would not load in a pipeline with multiple workers. Resolves #4660. (#4661)

Signed-off-by: David Venable <[email protected]>
@github-project-automation github-project-automation bot moved this from Unplanned to Done in Data Prepper Tracking Board Jun 25, 2024
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this issue Jul 23, 2024
…s fixes a bug where the service_map processor would not load in a pipeline with multiple workers. Resolves opensearch-project#4660. (opensearch-project#4661)

Signed-off-by: David Venable <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this issue Jul 23, 2024
…s fixes a bug where the service_map processor would not load in a pipeline with multiple workers. Resolves opensearch-project#4660. (opensearch-project#4661)

Signed-off-by: David Venable <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this issue Jul 30, 2024
…s fixes a bug where the service_map processor would not load in a pipeline with multiple workers. Resolves opensearch-project#4660. (opensearch-project#4661)

Signed-off-by: David Venable <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this issue Aug 8, 2024
…s fixes a bug where the service_map processor would not load in a pipeline with multiple workers. Resolves opensearch-project#4660. (opensearch-project#4661)

Signed-off-by: David Venable <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this issue Aug 12, 2024
…s fixes a bug where the service_map processor would not load in a pipeline with multiple workers. Resolves opensearch-project#4660. (opensearch-project#4661)

Signed-off-by: David Venable <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this issue Aug 14, 2024
…s fixes a bug where the service_map processor would not load in a pipeline with multiple workers. Resolves opensearch-project#4660. (opensearch-project#4661)

Signed-off-by: David Venable <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
@dlvenable dlvenable changed the title [BUG] Unable to create stateful processors with multiple works. [BUG] Unable to create stateful processors with multiple workers. Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

1 participant