You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (Jira)" <ji...@apache.org> on 2023/05/04 11:12:00 UTC
[jira] [Resolved] (OAK-10225) Utility to rate limit writes in case async indexing is delayed
[ https://issues.apache.org/jira/browse/OAK-10225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Mueller resolved OAK-10225.
----------------------------------
Fix Version/s: 1.52.0
Resolution: Fixed
> Utility to rate limit writes in case async indexing is delayed
> --------------------------------------------------------------
>
> Key: OAK-10225
> URL: https://issues.apache.org/jira/browse/OAK-10225
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: indexing
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Priority: Major
> Fix For: 1.52.0
>
>
> An application might writes too much stuff too quickly to the repository. In the extreme case, it might even write so much that the application might need to be stopped.
> To avoid this, rate-limiting the writes would be good. For this, we can add a utility class with a method rateLimitWrites(), which can be called in order to limit the writes, in case the async indexes are lagging behind badly.
> The method should return immediately if all async indexes are up-to-date (updated in the last 30 seconds).
> If indexing lanes are lagging behind, however, the method should wait (using Thread.sleep) for at most 1 minute. If the method is called more than once per minute, it should sleep for at most the time that passed until the last call; that is, an application that is calling it a lot will be paused for up to 50%. This assumes indexes will be able to catch up in this situation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)