-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Workload Resilience
-
ALL
-
WR Prioritized list
-
None
-
None
-
None
-
None
-
None
-
None
-
None
acquireToken maps the boost::none return from consumeWithBorrowNonBlocking (which only occurs when toConsume > burstSize) to napTime == 0 via value_or(0), resulting in successful admission with zero tokens consumed. Meanwhile the non-queued path (tryAcquireToken => consume()) correctly rejects the same request. This means behavior flips depending on queue depth: over-burst requests are rejected when the queue is empty but admitted for free when it's not.
This is production-reachable today via the WriteThrottler, which acquires in chunks of up to 1024 tokens. If rate * burstCapacitySecs < 1024 (e.g. target rate 100/s with 1s burst => burstSize 100), every chunk acquire is admitted free, bypassing the throttler entirely. The reconcileTokens path has the same hole: for numTokens > burstSize the folly call returns none before mutating anything, so the true-up silently no-ops.
Suggested fix: treat none as "consume/drain everything and borrow the rest" (or chunk internally), never as success.