You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kvserver,changefeeds,crosscluster: set per-consumer catchup scan limit
Currently, it is easily possible for a single slow rangefeed consumer
to acquire the entire catchup scan quota for a given store, preventing
any other consumers from advancing.
Here, we introduce the concept of a ConsumerID into the rangefeed
request. A ConsumerID is that it represents a logical rangefeed
consumer such as a changefeed or LDR stream. Such consumers may make
multiple MuxRangeFeed requests to a given node despite sharing the
same downstream consumer.
When per-consumer catchup scan limiting is enabled, no single consumer
is allowed to consumer more than 75% of a given store's capacity. If
no ConsumerID is specified, a random consumer ID is assigned to all
rangefeeds originating from a given MuxRangeFeed call.
In the long run, we need a more sophisticated approach to solve
this. This change is aimed to be a small improvement that solves the
most egregious case: a single slow consumer consuming the entire
quota. The goal of this change is an easily backportable feature,
however, it comes at the cost of adding yet-another mechanism
to the existing systems attempting to limit catchup scans:
1. Client-side rate limiter,
2. Store-level CatchupIter semaphore,
3. Elastic CPU rate limiting in the main CatchUpScan loop, and
4. Any limiting imposed now or in the future by virtue of including and
admission header in the request.
Informs #132438
Epic: none
Release note: None
0 commit comments