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

Cherry-pick #17026 to 7.x: Fix _id field in s3 and googlepubsub inputs #17117

Merged
merged 2 commits into from
Mar 19, 2020

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Mar 19, 2020

Cherry-pick of PR #17026 to 7.x branch. Original message:

What does this PR do?

In #15859 the Elasticsearch output was changed to read from the @metadata._id field when it had been using @metadata.id. The s3 and googlepubsub inputs had both been setting @metadata.id, but were not updated with that change.

This updates the s3 and googlepubsub inputs to use beat.Event#SetID() rather than creating the metadata object themselves.

Why is it important?

These inputs rely on the Elasticsearch _id field to prevent duplicate events from being written to Elasticsearch in certain edge cases.

Related issues

In elastic#15859 the Elasticsearch output was changed to read from the @metadata._id field when it had been using @metadata.id.
The s3 and googlepubsub inputs had both been setting @metadata.id, but were not updated with that change.

This updates the s3 and googlepubsub inputs to use `beat.Event#SetID()` rather than creating the metadata object themselves.

(cherry picked from commit 304eca4)
@andrewkroh andrewkroh merged commit a89a5cd into elastic:7.x Mar 19, 2020
@andrewkroh andrewkroh deleted the backport_17026_7.x branch January 14, 2022 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants