This PR allow the Event class to compile a `sprintf` the first time and
reuse the template for the other calls. This strategy speeds up considerably
calls that uses date formatting or use fieldref its a bit slower if you
dont do any string manipulation.
Fixes#3425
We were synchronizing on the tick and the flush call,
in some situation it could set logstash in a deadlock when the queue was
blocked and the tick occurred. The flush call was already thread safe
since only one worker can start the flushing process.
Fixes#3378
correct use of @lut and cleanups
leftover
added docs and renamed a few identifiers for clarity
typos
remove strict_set stuff since its not used anymore
removed unused specs
PathCache thread safety
This is a followup of the issues #2850 and #3281.
The following configuration:
if [condition] {
} else if [condition1]
or [condition2] {
..
}
Was compiled to ruby like this:
elsif condition or condition2 # else if [condition1]
or [condition2]
and making the intepreter fails.
Fixes#3386
The previous fix for disabling the `.bundle/config` wasn't not respecting the bundler contract.
The failling tests were not wrong, in fact they exposed the issue that the configuration was transient and the underlying hash of bundler was not correctly keeping the updated values.
This patch make sure the hash is updated with the new or deleted value without persisting the change to disk.
Fixes#3332
Logstash's config compiler adds a comment to the compiled code, like
if ..... # if [your] and [conditional]
The idea is to to help aid in reading the compiled logstash config.
However, if a conditional has newlines in it, the `#text_value` of
that conditional will have newlines, and we'll accidentally create
invalid ruby code which will fail with SyntaxError.
Prior to this change, the following Logstash config, under 1.5.0,
would cause a crash on startup:
if [some]
or [condition] {
...
}
The cause was that Logstash would compile this to:
if event("[some]"]) || event("[condition]") # if [some]
or [condition]
...
end
The 2nd line there `or [condition]` was intended to be on the line
above.
This change strips the line terminators \r and \n, just in case, and
provides a test case to cover.
I verified that this test case _fails_ without the config_ast.rb patch
and _succeeds_ with the patch.
Fixes#2850Fixes#3281
remove unused load path
use either local core lib dir or logstash-core gem
include spec in logstash-core
do not include lib, spec and locales dirs in package root
environment bootstrapping in lib/bootstrap.rb
added comments
move pluginmanager out of logstash-core
kafla installation solved by pluginmanager refactor
refactor bootstrap code
refactor shell scripts to simplify and DRY, indirect rspec command to our ruby launcher
add bin/rspec
cut by half the bin/plugin and bin/rspec startup time
fix drip context
use printf instead of tr
updated Windows bin scripts
missing gemspec in gemspec
use gem instead of gemspec so our plugin manager can correctly install logstash-core
generate packages including locally built logstash-core gem
move jenkins developmnent dependencies into Gemfile, they do not belong in logstash-core
path leftover
clean help agent help usage message and remore rspec in available command
comments cosmetics
update Bundler dependency, all recent testing have been made with 1.9.4
updated .lock file with regard to updated Gemfile
cleanup gemspec, Gemfile and regen .lock file
added progress output
avoid dual require on version
closes#3096
add Java Collection delete support with specs & more java_integration specs
split a spec
refactored for better specs
intersection specs
Ruby intersection on Java collections, refactored to use Java interfaces
specs for remove_tag from events from json input
refactor usage of subject
added Java Collection union with Ruby array and specs
refactored specs to also test for hash from deserialized json for JrJackson & Java Collections
typo and comments
solves #2261
make the jar manager to have some of the checks already present in the old load_elasticsearch_jars
removed the load_elasticsearch_jars! method as it's a legacy code from when ES was delivered within LS, nowadays this comes within the differents plugins
clean up Environment::JAR_DIR as is another legacy variable not used anymore
move the jar loading code within the environment module
ammend previous commit adding more clear code
ammend previous commits
added a few simple unit test for the jar manager in the environment module
refactor spec naming
dry out common code for loading jars
clean up env_spec bein in the util dir
cleaning up logstash-core dependencies related to jar-dependencies
ammend stale maen patches created for the LS way of using maven plugins
applied some comments coming from the review by @ph
bring back the maven tools and jar-dependency code as we still need some code like this for the kafka plugins
Revert "bring back the maven tools and jar-dependency code as we still need some code like this for the kafka plugins"
This reverts commit c23f456362776c0a600d78369c2ece8789fa49c2.
Fixes#2980
Beforehand, Event#include? would depend on a value of a certain
field to be non-nil as the signal that a field exists. This breaks
when a field's value is nil, even if the field exists. It is now
possible to check for existance of both normal and metadata fields.
Closes#2977.
Fixes#2997