-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
x-pack/filebeat/input/httpjson: make sure interval data clearing happens before processing #30730
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
24ed62b
to
fb0eb11
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
fb0eb11
to
4adb2f6
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
4adb2f6
to
082398b
Compare
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.
LGTM
This will need to be rebased onto the delint change after it is merged. |
…ens before processing
a67ec8d
to
c9af60b
Compare
/package |
/test |
…erval data clearing happens before processing (#31029) * x-pack/filebeat/input/httpjson: make sure interval data clearing happens before processing (#30730) (cherry picked from commit 043cab9) # Conflicts: # x-pack/filebeat/input/httpjson/internal/v2/request.go # x-pack/filebeat/input/httpjson/internal/v2/response.go * fix conflicts Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com> Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
…rval data clearing happens before processing (#31030) * x-pack/filebeat/input/httpjson: make sure interval data clearing happens before processing (#30730) (cherry picked from commit 043cab9) # Conflicts: # x-pack/filebeat/input/httpjson/request.go # x-pack/filebeat/input/httpjson/response.go * fix conflicts Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com> Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
…rval data clearing happens before processing (#31031) * x-pack/filebeat/input/httpjson: make sure interval data clearing happens before processing (#30730) (cherry picked from commit 043cab9) # Conflicts: # x-pack/filebeat/input/httpjson/request.go # x-pack/filebeat/input/httpjson/response.go * fix conflicts Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com> Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
…ens before processing (elastic#30730)
…re interval data clearing happens before processing (elastic#31030) * x-pack/filebeat/input/httpjson: make sure interval data clearing happens before processing (elastic#30730) (cherry picked from commit 1b40352) # Conflicts: # x-pack/filebeat/input/httpjson/request.go # x-pack/filebeat/input/httpjson/response.go * fix conflicts Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com> Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
…ens before processing (#30730)
What does this PR do?
This change ensures that request interval data is not cleared after a request has begun.
Why is it important?
Although extremely unlikely, there is otherwise no happens before relationship between the clearing of request interval data and the processing of the obtained data. If the interval data has been cleared during a request, spurious default first and last event, and last response values in the transform context can be set in the resulting published event.
The conditions for this to happen are that the request manages to progress at least one page of the pagination iterator before the call to
trCtx.clearIntervalData()
can complete. The chances of this happening are vanishingly small. However...Placing the call within
(*responseProcessor).startProcessing
provides an HB relationship between the interval clearing and the initiation of the pagination iteration and so precludes clearing the data before the events have been published.I have not been able to replicate the failure over ~1000 test iterations in the original state, which is consistent with the analysis, though still unsatisfying.
Checklist
- [ ] I have commented my code, particularly in hard-to-understand areas- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs