Skip to content

After updating bytes_per_second in the rate limiter, the change may not take effect immediately. #13695

Open
@jeffzheng404

Description

@jeffzheng404
Image available_bytes_ is updated by refill_bytes_per_period. If refill_bytes_per_period is set to a very large value, such as INT64_MAX (which is sometimes used to disable rate limiter), then available_bytes_ will also be set to INT64_MAX. Image

If you then set a new value for refill_bytes_per_period, for example 100MB, available_bytes_ will not be updated immediately. It will only be updated when available_bytes_ reaches 0. Therefore, during the period when available_bytes_ decreases from INT64_MAX to 0, rate limiter is disabled. The duration of this unlimited period depends on the size of available_bytes_. Since INT64_MAX is extremely large, rate limiting may be disabled for a long time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions