[ 
https://issues.apache.org/jira/browse/LUCENE-8915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16885923#comment-16885923
 ] 

Andrzej Bialecki  commented on LUCENE-8915:
-------------------------------------------

I think the javadoc needs to be clarified, both in SimpleRateLimiter and in the 
base class.

Base class needs to be more explicit about the fact that implementations may 
allow changing the limits during use. This is hinted at in the comment to 
{{setMBPerSec}} but should be stated directly.

Since {{setMBPerSec}} is public the TODO comment in SimpleRateLimiter is 
confusing - application may set a different limit at any time.

Also, looking at eg. {{RateLimitedIndexOutput.checkRate()}} , users of the API 
need to be aware that the value of {{getMinPauseCheckBytes()}} may change over 
time. In this case the code correctly re-inits its local variable to the latest 
value from the rate limiter but in other places it may not... so I think this 
volatility should also be stated in the javadoc for the 
{{getMinPauseCheckBytes()}} method.

> Allow RateLimiter To Have Dynamic Limits
> ----------------------------------------
>
>                 Key: LUCENE-8915
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8915
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Atri Sharma
>            Priority: Major
>
> RateLimiter does not allow dynamic configuration of the rate limit today. 
> This limits the kind of applications that the functionality can be applied 
> to. This Jira tracks 1) allowing the rate limiter to change limits 
> dynamically. 2) Add a RateLimiter subclass which exposes the same.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to