Skip to content

Fix: DLQ expects us to pass down an event #1012

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

Merged
merged 5 commits into from
Apr 20, 2021

Conversation

kares
Copy link
Contributor

@kares kares commented Apr 20, 2021

since Data Streams, we refactored to pass down event data directly instead of the previous event.to_hash mapping in safe_bulk (doing so potentially on every retry)

there seemed to have been no reason to keep the original event around (well turns except with DLQ).

besides practical reasons the early event.to_hash also addressed a requirement to ... sync data stream fields without effecting the original event.

unfortunately this broke DLQ support, which expects a LS::Event passed on write(event, reason)

resolves #1013

regressed after implementing data-stream support due lack of testing
@kares kares force-pushed the fix-dlq-writer-event-regression branch from 4dcd8c3 to d33b388 Compare April 20, 2021 12:14
@kares kares marked this pull request as ready for review April 20, 2021 12:33
EventActionTuple.new(action, params, event)
end

class EventActionTuple < Array # TODO: acting as an array for compatibility
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugly but I did not want to do a proper refactoring (replacing the Array with a proper struct) at this point,
given this is meant to be a quick fix ...

@kares kares force-pushed the fix-dlq-writer-event-regression branch from cc4d582 to d30cf0e Compare April 20, 2021 12:50
@kares kares force-pushed the fix-dlq-writer-event-regression branch from d30cf0e to f7dfb42 Compare April 20, 2021 13:16
Copy link
Contributor

@andsel andsel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kares kares merged commit e4f2209 into logstash-plugins:master Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

regression writing to DLQ in 11.0.0
3 participants