Change DropboxRateLimiter to rate limit proto tombstones and regular

tombstones separately.

Bug: 255249203
Test: atest ErrorsTest

Change-Id: I258657233ed643615cdd4b7ebdcf6447b1a964af
This commit is contained in:
Siim Sammul
2022-12-01 13:04:55 +00:00
parent c2427dd654
commit ac25f982da

View File

@@ -337,12 +337,10 @@ public class BootReceiver extends BroadcastReceiver {
return;
}
// Check if we should rate limit and abort early if needed. Do this for both proto and
// non-proto tombstones, even though proto tombstones do not support including the counter
// of events dropped since rate limiting activated yet.
// Check if we should rate limit and abort early if needed.
DropboxRateLimiter.RateLimitResult rateLimitResult =
sDropboxRateLimiter.shouldRateLimit(
proto ? TAG_TOMBSTONE_PROTO : TAG_TOMBSTONE, processName);
proto ? TAG_TOMBSTONE_PROTO_WITH_HEADERS : TAG_TOMBSTONE, processName);
if (rateLimitResult.shouldRateLimit()) return;
HashMap<String, Long> timestamps = readTimestamps();