Skip to content

Java execution reorders events even with 1 pipeline worker #10938

@jsvd

Description

@jsvd

Java execution seems to reorder the batch when using conditionals:

input {
  generator {
    lines => [
      "line 1",
      "line a",
      "line 2",
      "line b",
      "line 3",
      "line c"
    ]
    count => 1
  }
}

filter {
  grok { match => [ "message", "^line \d$" ] }

  if "_grokparsefailure" not in [tags] {
    ruby { code => '1+1' }
  } else {
    ruby { code => '1+1' }
  }
}

output { stdout { codec => line } }
/tmp/logstash-7.2.0 % bin/logstash -f test.conf -w 1 
2019-07-05T12:11:59.362Z overcraft.lan line 1
2019-07-05T12:11:59.375Z overcraft.lan line 2
2019-07-05T12:11:59.377Z overcraft.lan line 3
2019-07-05T12:11:59.375Z overcraft.lan line a
2019-07-05T12:11:59.376Z overcraft.lan line b
2019-07-05T12:11:59.377Z overcraft.lan line c
/tmp/logstash-7.2.0 % bin/logstash -f test.conf -w 1 --java-execution=false
2019-07-05T12:22:43.944Z overcraft.lan line 1
2019-07-05T12:22:43.955Z overcraft.lan line a
2019-07-05T12:22:43.956Z overcraft.lan line 2
2019-07-05T12:22:43.956Z overcraft.lan line b
2019-07-05T12:22:43.957Z overcraft.lan line 3
2019-07-05T12:22:43.957Z overcraft.lan line c

Right now the workaround is to use java-execution=false.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions