Fluentd fails to recover if metadata/chunk contains no data.
- Dominant language
- Ruby
- Stars
- 13.6k
- Forks
- 1.4k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 20
Description
Somehow I got this in file buffer:
```
$ ls -la /var/log/td-agent/buffer/buffer.b55f34d13a918cfd38c26929392511b73.log*
-rw-r--r-- 1 td-agent td-agent 0 Nov 30 15:22 /var/log/td-agent/buffer/buffer.b55f34d13a918cfd38c26929392511b73.log
-rw-r--r-- 1 td-agent td-agent 0 Nov 30 15:22 /var/log/td-agent/buffer/buffer.b55f34d13a918cfd38c26929392511b73.log.meta
```
This is probably caused by ungraceful shutdown.
This causes this exception to happen forever after restarting:
```
2017-11-30 15:27:25 +0000 [error]: #0 unexpected error while checking flushed chunks. ignored. error_class=NoMethodError error="undefined method `<' for nil:NilClass"
2017-11-30 15:27:25 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.24/lib/fluent/plugin/output.rb:1277:in `block in enqueue_thread_run'
2017-11-30 15:27:25 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.24/lib/fluent/plugin/buffer.rb:429:in `block in enqueue_all'
2017-11-30 15:27:25 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.24/lib/fluent/plugin/buffer.rb:424:in `each'
2017-11-30 15:27:25 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.24/lib/fluent/plugin/buffer.rb:424:in `enqueue_all'
2017-11-30 15:27:25 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.24/lib/fluent/plugin/output.rb:1277:in `enqueue_thread_run'
2017-11-30 15:27:25 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.24/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
```
fluentd version: 0.14.24
This may be somewhat related to https://github.com/fluent/fluentd/issues/1760
Contributor guide
Assessment
This issue has not been assessed yet.