Skip to content

Commit

Permalink
tmp: patch out_relabel
Browse files Browse the repository at this point in the history
TODO: This patch should be removed. We need to make a specific
plugin for this feature.

Signed-off-by: Daijiro Fukuda <[email protected]>
  • Loading branch information
daipom committed Aug 30, 2024
1 parent 2f4fe0c commit 41fd042
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/fluent/plugin/out_relabel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,10 @@ def multi_workers_ready?
def process(tag, es)
router.emit_stream(tag, es)
end

def write(chunk)
return if chunk.empty?
router.emit_stream(chunk.metadata.tag, Fluent::MessagePackEventStream.new(chunk.read))
end
end
end
1 change: 1 addition & 0 deletions lib/fluent/plugin/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,7 @@ def retry_state(randomize)
end

def submit_flush_once
return unless @buffer_config.flush_thread_count > 0
# Without locks: it is rough but enough to select "next" writer selection
@output_flush_thread_current_position = (@output_flush_thread_current_position + 1) % @buffer_config.flush_thread_count
state = @output_flush_threads[@output_flush_thread_current_position]
Expand Down

0 comments on commit 41fd042

Please sign in to comment.