mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Hack to work around some issues with multiple filter workers; realistically this may require some extra work to fix the design probelm found - for multiple filter workers, all filter instances are shared among filter worekrs. This may be undesirable?
This commit is contained in:
parent
915cae3c7b
commit
d73d2ced7b
1 changed files with 6 additions and 2 deletions
|
@ -130,6 +130,7 @@ class LogStash::Pipeline
|
|||
end
|
||||
|
||||
def start_filters
|
||||
@filters.each(&:register)
|
||||
@filter_threads = @settings["filter-workers"].times.collect do
|
||||
Thread.new { filterworker }
|
||||
end
|
||||
|
@ -170,11 +171,14 @@ class LogStash::Pipeline
|
|||
|
||||
def filterworker
|
||||
LogStash::Util::set_thread_name("|worker")
|
||||
@filters.each(&:register)
|
||||
begin
|
||||
while true
|
||||
event = @input_to_filter.pop
|
||||
break if event == LogStash::ShutdownSignal
|
||||
if event == LogStash::ShutdownSignal
|
||||
@input_to_filter.push(event)
|
||||
break
|
||||
end
|
||||
|
||||
|
||||
# TODO(sissel): we can avoid the extra array creation here
|
||||
# if we don't guarantee ordering of origin vs created events.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue