high level event exporter & cursor helpers#46975
Merged
fspmarshall merged 1 commit intomasterfrom Oct 7, 2024
Merged
Conversation
99258ff to
16fb5e8
Compare
zmb3
reviewed
Sep 30, 2024
16fb5e8 to
cddea78
Compare
zmb3
approved these changes
Sep 30, 2024
cddea78 to
605397b
Compare
rosstimothy
approved these changes
Oct 1, 2024
626d336 to
605397b
Compare
|
@fspmarshall See the table below for backport results.
|
This was referenced Oct 8, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends work started in #46651 intended to make it easier to reliably work with the new bulk event export API in a manner that is highly performant and difficult to accidentally misuse.
Two new helper types are introduced:
Exportermanages exporting of events across multiple dates, sequentially progressing through the target dates and managing a "backlog" of past dates to be polled in order to account for replication delays (replication delays have recently become a hot topic since we're starting to look into supporting multi-region audit logs with failover).Cursormanages saving the current state of anExporterto disk in an efficient manner (only writing diffs), and loading that state to allow resuming an export operation from where it left off.Both of these helpers have been manually tested against large amounts of real world audit log data containing millions of events spanning across multiple weeks.
This is part of an ongoing body of work related to #46193