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 handling of "match all"/"match either" #193

Merged
merged 1 commit into from Jun 30, 2017

Conversation

Projects
None yet
2 participants
@joschi
Contributor

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 Jun 29, 2017

@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,

This comment has been minimized.

@bernd

bernd Jun 29, 2017

Member

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)

This comment has been minimized.

@joschi

joschi Jun 30, 2017

Contributor

There were some uncommitted changes in my working directory. 😞

Fix handling of "match all"/"match either"
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 Jun 30, 2017

@bernd

bernd approved these changes Jun 30, 2017

LGTM 👍

@bernd bernd merged commit d150e27 into master Jun 30, 2017

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
graylog-project/pr Jenkins build graylog-project-pr-snapshot 291 has succeeded
Details

@bernd bernd deleted the graylog2-server-issue-3924 branch Jun 30, 2017

@bernd bernd removed the ready-for-review label Jun 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment