logstash-filter-kv 4.3.1 → 4.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9cb63418024cd83a07e3a1e9d0db30b8b8274abd7f35c510f0c201a23cc4186f
4
- data.tar.gz: 5714cdc93d81b6fb667700b3d1667426031d3df240894bea5275a031739449ef
3
+ metadata.gz: 4a0389b5313b78aef27792109c92631be74a254f23bd0142dae0ba3e79ce59aa
4
+ data.tar.gz: 3ae71f9cc966cf807a19f78533acb856c1cf4c2bf23bf4057c4fc57eed7a7e5d
5
5
  SHA512:
6
- metadata.gz: 7973b8e55a4ad5c215da44a1b1ae487c19ad4ec6ba8e47425f61f4667fb73e463100d8a5357e8ca7e4f294265554052e5c2c3ff21f6c497dacbe0bfeaa64d008
7
- data.tar.gz: '0956a1d87055c01ebf6aebfa0b2dcf4aa27b680d110192404b0d92db4dbfcb1a5f40cb259dbca820b22e3a3acc9d5dc14f6ffcce4d37d94b5925594bbac76ad2'
6
+ metadata.gz: ae1f4fe4b27459451f7048fcca0b83a7a3bf4c934eaec7c91384b728bce9fb67589ee0f14403467e3838dccf5957153d4dae887ceca0c3ccd5e158a428d20d89
7
+ data.tar.gz: 6f823c72944428578a112a622192c2218b5349f35433565f76832d99dc00b827ff9b1255c934f82ce853cd9472d6beec7b83f7a8751cb3e31c9d64926845b153
@@ -1,3 +1,7 @@
1
+ ## 4.3.2
2
+ - Resolved potential race condition in pipeline shutdown where the timeout enforcer could be shut down while work was still in-flight, potentially leading to stuck pipelines.
3
+ - Resolved potential race condition in pipeline shutdown where work could be submitted to the timeout enforcer after it had been shutdown, potentially leading to stuck pipelines.
4
+
1
5
  ## 4.3.1
2
6
  - Fixed asciidoc formatting in documentation [#81](https://github.com/logstash-plugins/logstash-filter-kv/pull/81)
3
7
 
@@ -609,6 +609,11 @@ class LogStash::Filters::KV < LogStash::Filters::Base
609
609
  end
610
610
 
611
611
  def execute(&block)
612
+ # If the enforcer is not running, either we failed to start it or it has
613
+ # already been stopped; in either case, we cannot reliably enforce the timeout
614
+ # so we raise a RuntimeError instead.
615
+ fail("TimeoutEnforcer not running.") unless alive?
616
+
612
617
  begin
613
618
  thread = java.lang.Thread.currentThread()
614
619
  @threads_to_start_time.put(thread, java.lang.System.nanoTime)
@@ -629,7 +634,7 @@ class LogStash::Filters::KV < LogStash::Filters::Base
629
634
  @running.set(true)
630
635
  @logger.debug("Starting timeout enforcer (#{@timeout_nanos}ns)")
631
636
  @timer_thread = Thread.new do
632
- while @running.get()
637
+ while @running.get() || !@threads_to_start_time.is_empty
633
638
  begin
634
639
  cancel_timed_out!
635
640
  rescue Exception => e
@@ -651,6 +656,10 @@ class LogStash::Filters::KV < LogStash::Filters::Base
651
656
  @timer_thread.join if @timer_thread
652
657
  end
653
658
 
659
+ def alive?
660
+ @running.get() && @timer_thread && @timer_thread.alive?
661
+ end
662
+
654
663
  private
655
664
 
656
665
  def cancel_timed_out!
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-kv'
4
- s.version = '4.3.1'
4
+ s.version = '4.3.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Parses key-value pairs"
7
7
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-kv
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.1
4
+ version: 4.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-15 00:00:00.000000000 Z
11
+ date: 2019-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement