Skip to content
Commit 0242c4d3 authored by Leonid Baraz's avatar Leonid Baraz Committed by Chromium LUCI CQ
Browse files

Add FilteredReportQueue to deduplicate events.

Declare FilteredReportQueue with Filter that can be used to accept or
reject events on the way to Enqueue. One of the possibilities is for
Filter subclass to keep track of previously enqueued event(s) and reject
the new one if it (partially) repeats what was enqueued before, or if
the new event is coming too soon after the previous one.

As opposed to rate limiting, it seems preferable to do it on top of
ReportQueue, so that we don't need to deserialize events for
filtering/comparing them (if it was done inside ReportQueue, it would be
too late for that: the events would already be serilalized).

Bug: b:279776541
Change-Id: Ia0f905f3cca27b6fc2f9f9b1e9a9b32e30ca4c94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4550027


Reviewed-by: default avatarAhmed Nasr <anasr@google.com>
Reviewed-by: default avatarVignesh Shenvi <vshenvi@google.com>
Commit-Queue: Leonid Baraz <lbaraz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1147329}
parent ddf80ddd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment