-
Notifications
You must be signed in to change notification settings - Fork 4.9k
x-pack/filebeat/input/awss3: fix document ID construction when using csv decoder #42019
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
Conversation
|
f456d3c
to
849ff10
Compare
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
event.SetID(objectID(p.s3ObjHash, offset)) | ||
if offset >= 0 { | ||
event.Fields.Put("log.offset", offset) | ||
event.SetID(objectID(p.s3ObjHash, offset)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we also skip setting the event ID? Is there something that uses this for idempotency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was the stimulus for the change; in the case that there is no way to know the offset, we would end of making an @metadata._id
for the document that is shared for all documents from the same object which would result in invalid document duplicates being handled by the index, and loss of data. By allowing a way to signal to the input that there is no way to differentiate between documents from the data source we allow downstream to know that it needs to fill the gap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification. In my first pass I missed part of the context.
This pull request is now in conflicts. Could you fix it? 🙏
|
82b42a7
to
de57f02
Compare
event.SetID(objectID(p.s3ObjHash, offset)) | ||
if offset >= 0 { | ||
event.Fields.Put("log.offset", offset) | ||
event.SetID(objectID(p.s3ObjHash, offset)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification. In my first pass I missed part of the context.
Proposed commit message
See title.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs