DEVPROD-11650 Don't recompute redactions for every Send invocation during test ingestion #8796
+42
−15
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.
DEVPROD-11650
Description
The redacting sender sorts the whole list of KV pairs to redact for every
.Send
, which invokes for every log line. For tasks with many keys to sort (server can have 40+), this sorting operation can be computationally intensive and take up significant time.Since test log ingestion happens after the task has completed and the expansions will no longer be changing, we can instead precompute the sorted list of redacted KV pairs once on initializing the sender, rather than every time we process a line.
Testing
Ran benchmarking tests on very large log files and confirmed that this change improved the benchmark test runtime performance on local machine (5m -> 1m30s).