Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix data corruption when creating batches. #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/logstash/outputs/influxdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def flush(events, teardown=false)
begin
if seen_series.has_key?(ev['name']) and (seen_series[ev['name']] == ev['columns'])
@logger.info("Existing series data found. Appending points to that series")
event_collection.select {|h| h['points'] << ev['points'][0] if h['name'] == ev['name']}
event_collection.select {|h| h['points'] << ev['points'][0] if h['columns'] == ev['columns']}
elsif seen_series.has_key?(ev['name']) and (seen_series[ev['name']] != ev['columns'])
@logger.warn("Series '#{ev['name']}' has been seen but columns are different or in a different order. Adding to batch but not under existing series")
@logger.warn("Existing series columns were: #{seen_series[ev['name']].join(",")} and event columns were: #{ev['columns'].join(",")}")
Expand Down