rate-limit: use token bucket in ShouldRateLimit() [crashpad/crashpad : main]

0 views
Skip to first unread message

Jesse McKenna (Gerrit)

unread,
Oct 17, 2025, 6:34:26 PM (18 hours ago) Oct 17
to Code Review Nudger, Mark Mentovai, Peter Boström, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Mark Mentovai

Jesse McKenna added 2 comments

Patchset-level comments
File-level comment, Patchset 27 (Latest):
Jesse McKenna . resolved

mark@: PTAL - I've updated this based on crrev.com/c/7038272. Any and all feedback is welcome. Thanks!

File handler/crash_report_upload_thread.cc
Line 398, Patchset 11: if (quota_used == -1) {
Peter Boström . resolved

This gets real weird when we make max_quota > 1, like if one of our saved timestamps are in the future, we'll still want it to count, but what report reason should we give for "5 reports have unexpected time, 7 are recent, so we've used 12 quota which is our max".

I don't think this is worth saving, and don't know how to preserve it past 1 max_quota. WDYT?

Jesse McKenna

Extremely belated update for posterity: I changed the logic from "quota used" to "number of attempts in interval" and I'm hoping that way around makes the code a bit less awkward.

P.S. just in case pbos@ sees this, hi!! Hope you and yours are doing well! : )

Open in Gerrit

Related details

Attention is currently required from:
  • Mark Mentovai
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I76b9a84af8d8605bd4aacdeff14a1b828c87b656
Gerrit-Change-Number: 6013036
Gerrit-PatchSet: 27
Gerrit-Owner: Jesse McKenna <jessem...@google.com>
Gerrit-Reviewer: Jesse McKenna <jessem...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Peter Boström <pb...@chromium.org>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Fri, 17 Oct 2025 22:34:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Peter Boström <pb...@chromium.org>
unsatisfied_requirement
open
diffy

Mark Mentovai (Gerrit)

unread,
Oct 17, 2025, 6:53:38 PM (18 hours ago) Oct 17
to Jesse McKenna, Peter Boström, Code Review Nudger, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Jesse McKenna

Mark Mentovai added 1 comment

Patchset-level comments
Mark Mentovai . unresolved

Before we get this into Crashpad, can you do a Crashpad roll into Chromium with your earlier change, so we can get that canary-tested in Chrome separately from this?

Crashpad imports into Chromium can be done by running third_party/Crashpad/update.py from a Chromium checkout.

Will review this next week.

Open in Gerrit

Related details

Attention is currently required from:
  • Jesse McKenna
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I76b9a84af8d8605bd4aacdeff14a1b828c87b656
Gerrit-Change-Number: 6013036
Gerrit-PatchSet: 27
Gerrit-Owner: Jesse McKenna <jessem...@google.com>
Gerrit-Reviewer: Jesse McKenna <jessem...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Peter Boström <pb...@chromium.org>
Gerrit-Attention: Jesse McKenna <jessem...@google.com>
Gerrit-Comment-Date: Fri, 17 Oct 2025 22:53:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Jesse McKenna (Gerrit)

unread,
Oct 17, 2025, 8:11:44 PM (17 hours ago) Oct 17
to Peter Boström, Code Review Nudger, Mark Mentovai, Crashpad LUCI CQ, crashp...@chromium.org

Jesse McKenna added 1 comment

Patchset-level comments
Mark Mentovai . resolved

Before we get this into Crashpad, can you do a Crashpad roll into Chromium with your earlier change, so we can get that canary-tested in Chrome separately from this?

Crashpad imports into Chromium can be done by running third_party/Crashpad/update.py from a Chromium checkout.

Will review this next week.

Jesse McKenna

Okay, will do! Thanks for the explanation.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I76b9a84af8d8605bd4aacdeff14a1b828c87b656
Gerrit-Change-Number: 6013036
Gerrit-PatchSet: 27
Gerrit-Owner: Jesse McKenna <jessem...@google.com>
Gerrit-Reviewer: Jesse McKenna <jessem...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Peter Boström <pb...@chromium.org>
Gerrit-Comment-Date: Sat, 18 Oct 2025 00:11:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages