Skip to content

Commit

Permalink
use thread local unpacker
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <[email protected]>
  • Loading branch information
ganmacs committed Aug 16, 2019
1 parent f4186cf commit b8021e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/fluent/event_router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def initialize
@filters = []
@output = nil
@optimizer = FilterOptimizer.new
@unpacker = Fluent::MessagePackFactory.unpacker
end

def add_filter(filter)
Expand Down Expand Up @@ -184,7 +183,7 @@ def filter_stream(tag, es)

def optimized_filter_stream(tag, es)
new_es = MultiEventStream.new
es.each(unpacker: @unpacker) do |time, record|
es.each(unpacker: Fluent::MessagePackFactory.thread_local_msgpack_unpacker) do |time, record|
filtered_record = record
filtered_time = time

Expand Down

0 comments on commit b8021e9

Please sign in to comment.