fluent-plugin-concat 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +24 -0
- data/fluent-plugin-concat.gemspec +1 -1
- data/lib/fluent/plugin/filter_concat.rb +21 -14
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a119cbc6b5774f81bde44b530ece7292c1f83635d6577155baad7d3c6d9544c
|
4
|
+
data.tar.gz: 92c703271e63894f9b56c8a4d3d22c68c79c2ee6e219adb9b934fbb05a7464cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc59b890e0a82eca4a27663f2705f1ae4bf98e2d89c626696f90f523b73310df779cb26b92fdf544aa0e149f3c3e4b97569ea7291475b828ed2378082ec3a0bf
|
7
|
+
data.tar.gz: 6b7eca55c66e0a038faf738ff718952a57bbf382881ffc7c03663984ede6f8e34d3219b737f4922ec83e1e82d82d823d64ad4a943e96dc9d8581fac1c78a81ad
|
data/NEWS.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
# ChangeLog
|
2
2
|
|
3
|
+
## v2.2.3
|
4
|
+
|
5
|
+
### Fixes
|
6
|
+
|
7
|
+
* Fix a bug that `@timeout_map` will be updated while traversing it. See #49
|
8
|
+
|
9
|
+
## v.2.2.2
|
10
|
+
|
11
|
+
### Fixes
|
12
|
+
|
13
|
+
* #48
|
14
|
+
|
15
|
+
## v2.2.1
|
16
|
+
|
17
|
+
### Fixes
|
18
|
+
|
19
|
+
* #45
|
20
|
+
|
21
|
+
## v2.2.0
|
22
|
+
|
23
|
+
### Fixes
|
24
|
+
|
25
|
+
* #43
|
26
|
+
|
3
27
|
## v2.0.0
|
4
28
|
|
5
29
|
* Use Fluentd v0.14 API and drop Fluentd v0.12 or earlier support
|
@@ -34,7 +34,10 @@ module Fluent::Plugin
|
|
34
34
|
super
|
35
35
|
|
36
36
|
@buffer = Hash.new {|h, k| h[k] = [] }
|
37
|
-
@
|
37
|
+
@timeout_map_mutex = Thread::Mutex.new
|
38
|
+
@timeout_map_mutex.synchronize do
|
39
|
+
@timeout_map = Hash.new {|h, k| h[k] = Fluent::Engine.now }
|
40
|
+
end
|
38
41
|
end
|
39
42
|
|
40
43
|
def configure(conf)
|
@@ -119,7 +122,9 @@ module Fluent::Plugin
|
|
119
122
|
else
|
120
123
|
stream_identity = "#{tag}:default"
|
121
124
|
end
|
122
|
-
@
|
125
|
+
@timeout_map_mutex.synchronize do
|
126
|
+
@timeout_map[stream_identity] = Fluent::Engine.now
|
127
|
+
end
|
123
128
|
case @mode
|
124
129
|
when :line
|
125
130
|
process_line(stream_identity, tag, time, record)
|
@@ -220,18 +225,20 @@ module Fluent::Plugin
|
|
220
225
|
def flush_timeout_buffer
|
221
226
|
now = Fluent::Engine.now
|
222
227
|
timeout_stream_identities = []
|
223
|
-
@
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
228
|
+
@timeout_map_mutex.synchronize do
|
229
|
+
@timeout_map.each do |stream_identity, previous_timestamp|
|
230
|
+
next if @flush_interval > (now - previous_timestamp)
|
231
|
+
next if @buffer[stream_identity].empty?
|
232
|
+
time, flushed_record = flush_buffer(stream_identity)
|
233
|
+
timeout_stream_identities << stream_identity
|
234
|
+
tag = stream_identity.split(":").first
|
235
|
+
message = "Timeout flush: #{stream_identity}"
|
236
|
+
handle_timeout_error(tag, @use_first_timestamp ? time : now, flushed_record, message)
|
237
|
+
log.info(message)
|
238
|
+
end
|
239
|
+
@timeout_map.reject! do |stream_identity, _|
|
240
|
+
timeout_stream_identities.include?(stream_identity)
|
241
|
+
end
|
235
242
|
end
|
236
243
|
end
|
237
244
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-concat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenji Okimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.7.
|
143
|
+
rubygems_version: 2.7.6
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Fluentd Filter plugin to concat multiple event messages
|