fluentd 0.14.24 → 0.14.25

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b8e3c3ad160e7b55045cc90693e4ed49e32e4d2
4
- data.tar.gz: 0e0d26c585d8f9bd617050ce04936dc8a2d38095
3
+ metadata.gz: f484a644308a8845fea9a1d1c7e5dffcc1660de0
4
+ data.tar.gz: eb06fee3d5f392a76ace5fdb2e60f3be250d5249
5
5
  SHA512:
6
- metadata.gz: 2a1790cd33c2c41176dd0452d918b979d21a5e7ac32f7730ad91d9b8c62404c095303d90f39bf69ea11dfac193bf733613e6926fc1aa7a73d8f6941f71c94bdb
7
- data.tar.gz: 254bedd1088b57682cdbe0df7f547cad567702b6872d334c6cc82eb9d95c85f95a6c7537850bc0668a653ce73e4d69093861c482c45f459e9e49490a657521d7
6
+ metadata.gz: 91d09e99c7c0745af5f578f27e449f82535f763cba786acf8997ca0994166b2b2f481f99fa4236d5b799bdc89948c8d9d447aba879d4e63b6a9744cd56b55f02
7
+ data.tar.gz: 3c287549f1d5038f58c039ee082fd69661c28400b4d47562039bd229371a6af48d1b3bbd47965664ead892d95077fae4336e4b91b7ff51385d9c785b57b2935e
@@ -1,3 +1,19 @@
1
+ # v1.0
2
+
3
+ ## Release v1.0.0.rc1/v0.14.25 - 2017/11/29
4
+
5
+ ### New features / Enhancements
6
+
7
+ * Disable tracepoint feature to omit unnecessary insts
8
+ https://github.com/fluent/fluentd/pull/1764
9
+
10
+ ### Bug fixes
11
+
12
+ * out_forward: Don't update retry state when failed to get ack response.
13
+ https://github.com/fluent/fluentd/pull/1686
14
+ * plugin: Combine before_shutdown and shutdown call in one sequence.
15
+ https://github.com/fluent/fluentd/pull/1763
16
+
1
17
  # v0.14
2
18
 
3
19
  ## Release v0.14.24 - 2017/11/24
@@ -433,7 +433,7 @@ module Fluent::Plugin
433
433
  if raw_data.empty?
434
434
  log.warn "destination node closed the connection. regard it as unavailable.", host: info.node.host, port: info.node.port
435
435
  info.node.disable!
436
- rollback_write(info.chunk_id)
436
+ rollback_write(info.chunk_id, update_retry: false)
437
437
  return nil
438
438
  else
439
439
  unpacker.feed(raw_data)
@@ -442,7 +442,7 @@ module Fluent::Plugin
442
442
  if res['ack'] != info.chunk_id_base64
443
443
  # Some errors may have occured when ack and chunk id is different, so send the chunk again.
444
444
  log.warn "ack in response and chunk id in sent data are different", chunk_id: dump_unique_id_hex(info.chunk_id), ack: res['ack']
445
- rollback_write(info.chunk_id)
445
+ rollback_write(info.chunk_id, update_retry: false)
446
446
  return nil
447
447
  else
448
448
  log.trace "got a correct ack response", chunk_id: dump_unique_id_hex(info.chunk_id)
@@ -483,7 +483,7 @@ module Fluent::Plugin
483
483
  log.warn "no response from node. regard it as unavailable.", host: info.node.host, port: info.node.port
484
484
  info.node.disable!
485
485
  info.sock.close rescue nil
486
- rollback_write(info.chunk_id)
486
+ rollback_write(info.chunk_id, update_retry: false)
487
487
  else
488
488
  sockets << info.sock
489
489
  new_list << info
@@ -226,7 +226,7 @@ module Fluent
226
226
 
227
227
  singleton_class.module_eval do
228
228
  define_method(:commit_write){ |chunk_id| @primary_instance.commit_write(chunk_id, delayed: delayed_commit, secondary: true) }
229
- define_method(:rollback_write){ |chunk_id| @primary_instance.rollback_write(chunk_id) }
229
+ define_method(:rollback_write){ |chunk_id, update_retry: true| @primary_instance.rollback_write(chunk_id, update_retry) }
230
230
  end
231
231
  end
232
232
 
@@ -991,7 +991,9 @@ module Fluent
991
991
  end
992
992
  end
993
993
 
994
- def rollback_write(chunk_id)
994
+ # update_retry parameter is for preventing busy loop by async write
995
+ # We will remove this parameter by re-design retry_state management between threads.
996
+ def rollback_write(chunk_id, update_retry: true)
995
997
  # This API is to rollback chunks explicitly from plugins.
996
998
  # 3rd party plugins can depend it on automatic rollback of #try_rollback_write
997
999
  @dequeued_chunks_mutex.synchronize do
@@ -1002,8 +1004,10 @@ module Fluent
1002
1004
  # in many cases, false can be just ignored
1003
1005
  if @buffer.takeback_chunk(chunk_id)
1004
1006
  @counters_monitor.synchronize{ @rollback_count += 1 }
1005
- primary = @as_secondary ? @primary_instance : self
1006
- primary.update_retry_state(chunk_id, @as_secondary)
1007
+ if update_retry
1008
+ primary = @as_secondary ? @primary_instance : self
1009
+ primary.update_retry_state(chunk_id, @as_secondary)
1010
+ end
1007
1011
  true
1008
1012
  else
1009
1013
  false
@@ -212,7 +212,6 @@ module Fluent
212
212
 
213
213
  lifecycle_unsafe_sequence = ->(method, checker) {
214
214
  operation = case method
215
- when :before_shutdown then "preparing shutdown"
216
215
  when :shutdown then "shutting down"
217
216
  when :close then "closing"
218
217
  else
@@ -228,11 +227,23 @@ module Fluent
228
227
  Thread.current.abort_on_exception = true
229
228
  begin
230
229
  if method == :shutdown
230
+ # To avoid Input#shutdown and Output#before_shutdown mismatch problem, combine before_shutdown and shutdown call in one sequence.
231
+ # The problem is in_tail flushes buffered multiline in shutdown but output's flush_at_shutdown is invoked in before_shutdown
232
+ operation = "preparing shutdown" # for logging
233
+ log.debug "#{operation} #{kind} plugin", type: Plugin.lookup_type_from_class(instance.class), plugin_id: instance.plugin_id
234
+ begin
235
+ instance.send(:before_shutdown) unless instance.send(:before_shutdown?)
236
+ rescue Exception => e
237
+ log.warn "unexpected error while #{operation} on #{kind} plugin", plugin: instance.class, plugin_id: instance.plugin_id, error: e
238
+ log.warn_backtrace
239
+ end
240
+ operation = "shutting down"
231
241
  log.info "#{operation} #{kind} plugin", type: Plugin.lookup_type_from_class(instance.class), plugin_id: instance.plugin_id
242
+ instance.send(:shutdown) unless instance.send(:shutdown?)
232
243
  else
233
244
  log.debug "#{operation} #{kind} plugin", type: Plugin.lookup_type_from_class(instance.class), plugin_id: instance.plugin_id
245
+ instance.send(method) unless instance.send(checker)
234
246
  end
235
- instance.send(method) unless instance.send(checker)
236
247
  rescue Exception => e
237
248
  log.warn "unexpected error while #{operation} on #{kind} plugin", plugin: instance.class, plugin_id: instance.plugin_id, error: e
238
249
  log.warn_backtrace
@@ -245,8 +256,6 @@ module Fluent
245
256
  lifecycle_safe_sequence.call(:stop, :stopped?)
246
257
 
247
258
  # before_shutdown does force_flush for output plugins: it should block, so it's unsafe operation
248
- lifecycle_unsafe_sequence.call(:before_shutdown, :before_shutdown?)
249
-
250
259
  lifecycle_unsafe_sequence.call(:shutdown, :shutdown?)
251
260
 
252
261
  lifecycle_safe_sequence.call(:after_shutdown, :after_shutdown?)
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '0.14.24'
19
+ VERSION = '0.14.25'
20
20
 
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.24
4
+ version: 0.14.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-24 00:00:00.000000000 Z
11
+ date: 2017-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack