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

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

bq.  what prevents us from using a 1 minute timeout (indexing pause at most 2 
minutes)?

Fear of unknown ;) Some aspects I can think of

# Cluster node N2 has a delayed background read and there in unstable topology 
it sees older value of lease update (say 2 mins old) and then it decides it can 
break the lease. In this case merge would not be successful but there would 
some churn though
# With 1 min lease we would be update the lease every minute. So if an indexing 
cycle takes 10 min we would be doing 10 in between commits to renew the lease

Note that the lease feature is a second level defence. If the setup has stable 
topology and the scheduling logic can ensure that indexing job is running as a 
true singleton in a cluster then it is not much required. 

In all thinking about it now I think we can reduce the timeout to 1 mins

[~alex.parvulescu] Thoughts?

> 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: indexing
>            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.15#6346)

Reply via email to