Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Fix handling of "match all"/"match either" #193

Merged
merged 1 commit into from
Jun 30, 2017
Merged

Conversation

joschi
Copy link
Contributor

@joschi joschi commented Jun 29, 2017

The pipeline interpreter had a bug regarding the handling of the "match all" and "match either" statements which caused pipelines containing stages with "match all" to continue processing even if not all rules in the stage were executed.

Fixes Graylog2/graylog2-server#3924

@joschi joschi added this to the 2.3.0 milestone Jun 29, 2017
@joschi joschi requested review from bernd and kroepke June 29, 2017 14:03
@bernd bernd self-assigned this Jun 29, 2017
private final boolean cachedIterators;

@AssistedInject
public State(@Assisted ImmutableMap<String, Pipeline> currentPipelines,
@Assisted ImmutableSetMultimap<String, Pipeline> streamPipelineConnections,
@Nullable @Assisted ClassLoader commonClassLoader,
Copy link
Member

Choose a reason for hiding this comment

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

This breaks the server startup. How did this work in your setup?

2017-06-29 18:06:20,707 ERROR: org.graylog2.bootstrap.CmdLineTool - Guice error (more detail on log level debug): org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter$State has @AssistedInject constructors, but none of them match the parameters in method org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter$State$Factory.newState().  Unable to create AssistedInject factory.
Disconnected from the target VM, address: '127.0.0.1:44391', transport: 'socket'
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) No implementation for org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter$State$Factory was bound.
  while locating org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter$State$Factory
    for the 9th parameter of org.graylog.plugins.pipelineprocessor.processors.ConfigurationStateUpdater.<init>(ConfigurationStateUpdater.java:74)
  while locating org.graylog.plugins.pipelineprocessor.processors.ConfigurationStateUpdater
    for the 3rd parameter of org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter.<init>(PipelineInterpreter.java:83)
  at org.graylog2.plugin.PluginModule.addMessageProcessor(PluginModule.java:152) (via modules: org.graylog2.shared.bindings.PluginBindings -> org.graylog.plugins.pipelineprocessor.PipelineProcessorModule)

2) org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter$State has @AssistedInject constructors, but none of them match the parameters in method org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter$State$Factory.newState().  Unable to create AssistedInject factory.
  while locating org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter$State
  at org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter$State$Factory.newState(PipelineInterpreter.java:1)

2 errors
	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
	at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
	at com.google.inject.Guice.createInjector(Guice.java:99)
	at org.graylog2.shared.bindings.GuiceInjectorHolder.createInjector(GuiceInjectorHolder.java:34)
	at org.graylog2.bootstrap.CmdLineTool.setupInjector(CmdLineTool.java:379)
	at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:193)
	at org.graylog2.bootstrap.Main.main(Main.java:44)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There were some uncommitted changes in my working directory. 😞

The pipeline interpreter had a bug regarding the handling of the "match all" and "match either"
statements which caused pipelines containing stages with "match all" to continue processing even
if not all rules in the stage were executed.

Fixes Graylog2/graylog2-server#3924
@joschi joschi force-pushed the graylog2-server-issue-3924 branch from efdb4f6 to dad3774 Compare June 30, 2017 07:57
Copy link
Member

@bernd bernd left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bernd bernd merged commit d150e27 into master Jun 30, 2017
@bernd bernd deleted the graylog2-server-issue-3924 branch June 30, 2017 10:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants