Skip to content
New issue

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

Deprecate "table created" error #167

Merged

Conversation

abicky
Copy link
Contributor

@abicky abicky commented Sep 9, 2018

This PR changes the behavior not to raise so many errors when auto_create_table is set to true.
Fluentd sometimes drops all chunks without transition to secondary if so many errors occur.
See fluent/fluentd#2123 for more details.

type: @options[:time_partitioning_type].to_s.upcase,
field: @options[:time_partitioning_field] ? @options[:time_partitioning_field].to_s : nil,
expiration_ms: @options[:time_partitioning_expiration] ? @options[:time_partitioning_expiration] * 1000 : nil
}.compact
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash#compact is added when ruby version is 2.4.0.
But current version of this plugin supports ruby-2.3.0 or later.
Please use reject { |_, v| v.nil? }.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed the code to use Hash#reject 06074eb.
In addition, I've changed some tests so that they fail if we use Hash#compact. c4d12f0.

@abicky abicky force-pushed the deprecate-table-created-error branch from dd6d00e to 06074eb Compare September 10, 2018 09:54
Copy link
Collaborator

@joker1007 joker1007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM.

@joker1007 joker1007 merged commit 5a054b1 into fluent-plugins-nursery:master Sep 12, 2018
@abicky abicky deleted the deprecate-table-created-error branch September 18, 2018 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants