diff --git a/e2e/e2e.rb b/e2e/e2e.rb index cabc1f4..5e0d2b7 100755 --- a/e2e/e2e.rb +++ b/e2e/e2e.rb @@ -41,6 +41,7 @@ def initialize database => "#{@database}" table => "#{@table_with_mapping}" json_mapping => "#{@mapping_name}" + max_size => 2 } kusto { path => "nomaptmp%{+YYYY-MM-dd-HH-mm}.txt" @@ -48,6 +49,7 @@ def initialize ingest_url => "#{@ingest_url}" database => "#{@database}" table => "#{@table_without_mapping}" + max_size => 3 } } } diff --git a/lib/logstash/outputs/kusto/custom_size_based_buffer.rb b/lib/logstash/outputs/kusto/custom_size_based_buffer.rb index 3b893c0..a5d972a 100644 --- a/lib/logstash/outputs/kusto/custom_size_based_buffer.rb +++ b/lib/logstash/outputs/kusto/custom_size_based_buffer.rb @@ -24,7 +24,7 @@ def <<(event) @mutex.synchronize do @buffer << event if @buffer.size >= @max_size - @logger.debug("Size-based flush triggered") + @logger.debug("Size-based flush triggered after #{@max_size} was reached") flush end end @@ -47,7 +47,7 @@ def start_flusher_thread @mutex.synchronize do break if @shutdown if Time.now - @last_flush_time >= @max_interval - @logger.debug("Time-based flush triggered") + @logger.debug("Time-based flush triggered after #{@max_interval} seconds") flush end @flusher_condition.wait(@mutex, @max_interval) # Wait for either the interval or shutdown signal