lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-1.7.1 vs lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-1.7.2
- old
+ new
@@ -469,11 +469,11 @@
unless conf.has_key?('s3_object_key_format')
log.warn "The default value of s3_object_key_format will use ${chunk_id} instead of %{index} to avoid object conflict in v2"
end
is_working_on_parallel = @buffer_config.flush_thread_count > 1 || system_config.workers > 1
- if is_working_on_parallel && ['${chunk_id}', '%{uuid_flush}'].none? { |key| @s3_object_key_format.include?(key) }
- log.warn "No ${chunk_id} or %{uuid_flush} in s3_object_key_format with multiple flush threads or multiple workers. Recommend to set ${chunk_id} or %{uuid_flush} to avoid data lost by object conflict"
+ if is_working_on_parallel && ['${chunk_id}', '%{uuid_flush}', '%{hex_random}'].none? { |key| @s3_object_key_format.include?(key) }
+ log.warn "No ${chunk_id}, %{uuid_flush} or %{hex_random} in s3_object_key_format with multiple flush threads or multiple workers. Recommend to set ${chunk_id}, %{uuid_flush} or %{hex_random} to avoid data lost by object conflict"
end
end
def check_apikeys
@bucket.objects(prefix: @path, :max_keys => 1).first