[v17] Implement Compaction of Desktop Shared Directory Read/Write Events#58445
Merged
rhammonds-teleport merged 1 commit intobranch/v17from Sep 2, 2025
Merged
Conversation
…eads and writes Attempt #2. Read requests for a given copy operation can arrive out of order. Adjusted this approach to record all read/write events within a given time period, then find the longest contiguous set of reads/writes that can be joined into a single audit event before emitting audit event(s). bit of cleanup A bit of code cleanup plus extra test case. Removed timestamps from testing since the compaction algorithm can't really guarantee which segments will get grouped together. Fix racy tests by bringing assertions into synctest bubble and using 'flush' for syncronization. Also add more thorough test cases for timer expiration and flush behavior. lint fixes Add license header Replace unnecessary sort with 'slices.Min' Apply suggestions from code review Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com> Rename 'evnt' -> 'event' Return iterator instead of slice Abandon 'stream' terminology in favor of 'fileOperationsBucket'. This might be a better name since the code is basically sorting audit events into a set of 'buckets' and attempting to compact each bucket of events later on. Add a few comments
danielashare
approved these changes
Aug 28, 2025
zmb3
approved these changes
Aug 29, 2025
Merged
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.
Backport #57815 to branch/v17
changelog: Reduce audit log clutter by compacting contiguous shared directory read/write events into a single audit log event.