We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This problem was originally reported by @guyboertje in #5212. I am copying the invalidation bug sequence here:
> event = LogStash::Event.new => #<LogStash::Event:0x25ce435 @metadata_accessors=#<LogStash::Util::Accessors:0x7ea71fc2 @store={}, @lut={}>, @cancelled=false, @data={"@version"=>"1", "@timestamp"=>"2016-04-15T14:19:31.561Z"}, @metadata={}, @accessors=#<LogStash::Util::Accessors:0x7cd5fcf4 @store={"@version"=>"1", "@timestamp"=>"2016-04-15T14:19:31.561Z"}, @lut={}>> > event["[a][0]"] => nil > event["[a][0]"] = 42 => 42 > event["[a]"] => {"0"=>42} > event["[a]"] = [42,24] => [42, 24] > event["[a]"] => [42, 24] > event["[a][0]"] => 42 > event["[a]"] = [24,42] => [24, 42] > event["[a][0]"] => 42 > event["[a][0]"] = {"a"=> 99, "b" => 98} => {"a"=>99, "b"=>98} > event["[a][0]"] => {"a"=>99, "b"=>98} > event["[a]"] => [24, 42] > event["[a][0]"] => {"a"=>99, "b"=>98} > event["[a][0][b]"] TypeError: can't convert String into Integer from org/jruby/RubyFixnum.java:1143:in `[]'
I wrote a spec with this sequence and confirm the problem on both the Ruby and Java Event implementations.
The text was updated successfully, but these errors were encountered:
The following spec sequence is basically the test above.
expect(event["[a][0]"]).to be_nil expect(event["[a][0]"] = 42).to eq(42) expect(event["[a][0]"]).to eq(42) expect(event["[a]"]).to eq({"0" => 42}) expect(event["[a]"] = [42, 24]).to eq([42, 24]) expect(event["[a]"]).to eq([42, 24]) expect(event["[a][0]"]).to eq(42) expect(event["[a]"] = [24, 42]).to eq([24, 42]) expect(event["[a][0]"]).to eq(24) expect(event["[a][0]"] = {"a "=> 99, "b" => 98}).to eq({"a "=> 99, "b" => 98}) expect(event["[a][0]"]).to eq({"a "=> 99, "b" => 98}) expect(event["[a]"]).to eq([{"a "=> 99, "b" => 98}, 42]) expect(event["[a][0]"]).to eq({"a "=> 99, "b" => 98}) expect(event["[a][1]"]).to eq(42) expect(event["[a][0][b]"]).to eq(98)
@lut
I will see if/how we can invalidate the @lut only when required.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
This problem was originally reported by @guyboertje in #5212. I am copying the invalidation bug sequence here:
I wrote a spec with this sequence and confirm the problem on both the Ruby and Java Event implementations.
The text was updated successfully, but these errors were encountered: