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

Chetan Mehrotra commented on OAK-3834:
--------------------------------------

bq. 15 minutes is quite long. What are the risks of changing this to 1 minutes?

The lease currently gets updated based on {{IndexUpdateCallback}} and no 
parallel thread is maintained to keep the lease alive. {{IndexUpdateCallback}} 
is only invoked if something gets indexed. It can happen that for an index 
which indexes only very few nodes (of very specific types) the reindex logic 
has to traverse whole repository and in doing that its possible that nothing 
gets indexed say for 5 mins. In such a case another cluster node would "think" 
that indexing has stalled and takes over and then it would get in loop.

One way out would be to update the lease via a dedicated thread rather than 
relying on callback during indexing. 

bq. According to some tests, the timeout mechanism is also used with the 
segment store, even thought there can not be multiple cluster nodes. I thought 
the timeout mechanism is only used with the document store?

AsyncIndexUpdate is not aware of type of NodeStore. May be now we can make use 
{{Clusterable}} to detect that.

> AsyncIndexUpdate default async lease timeout is (too?) long
> -----------------------------------------------------------
>
>                 Key: OAK-3834
>                 URL: https://issues.apache.org/jira/browse/OAK-3834
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: query
>            Reporter: Thomas Mueller
>
> Oak ensures the async indexes are updated only in one cluster node, using a 
> lease mechanism in oak-core, org.apache.jackrabbit.oak.plugins.index, 
> AsyncIndexUpdate, DEFAULT_ASYNC_TIMEOUT. The default is 15 minutes (system 
> property "oak.async.lease.timeout", default "15").
> After killing the process or (when using OSGi) updating the Oak bundle, 
> sometimes the index is not updated for 15 minutes. 
> 15 minutes is quite long. What are the risks of changing this to 1 minutes?
> According to some tests, the timeout mechanism is also used with the segment 
> store, even thought there can not be multiple cluster nodes. I thought the 
> timeout mechanism is only used with the document store?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to