diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-01-06 11:49:57 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-01-10 14:35:01 +0000 |
commit | 3f15206f090ce36c08282b8d64d6ff9c15c8fd69 (patch) | |
tree | edc117087a4fac59dc6f507e5c88f305845839ca /searchcore | |
parent | 6fc8a76d2062e6176510804be59faffe2e20662d (diff) |
Support dynamic throttling of async persistence operations
Adds an operation throttler that is intended to provide global throttling
of async operations across all persistence stripe threads. A throttler
wraps a logical max pending window size of in-flight operations. Depending
on the throttler implementation, the window size may expand and shrink
dynamically. Exactly how and when this happens is unspecified.
Commit adds two throttler implementations:
* An unlimited throttler that is no-op and never blocks.
* A throttler built around the mbus `DynamicThrottlePolicy` and defers
all window decisions to it.
Current config default is to use the unlimited throttler. Config changes
require a process restart.
Offers both polling and (timed, non-timed) blocking calls for acquiring
a throttle token. If the returned token is valid, the caller may proceed
to invoke the asynchronous operation.
The window slot taken up by a valid throttle token is implicitly freed up
when the token is destroyed.
Diffstat (limited to 'searchcore')
0 files changed, 0 insertions, 0 deletions