219
persistenceMaxRPS dynamicconfig.IntPropertyFn,
220
persistenceMaxRPSRatio float64,
222
>
// TODO: reuse persistence rate limit calculator in PersistenceRateLimitingParamsProvider
223
>
224
>
return func() float64 {
225
>
if maxPollHostRps := hostRPS(); maxPollHostRps > 0 {
226
return float64(maxPollHostRps)
227
}
228
230
>
// ensure queue loading won't consume all persistence tokens
231
>
// especially upon host restart when we need to perform a load
232
>
// for all shards
233
>
return float64(pMaxRPS) * persistenceMaxRPSRatio
234
>
}
235
236
// persistenceMaxQPS=0 means "unlimited" — use a high default to avoid