jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-3834) AsyncIndexUpdate default async lease timeout is (too?) long
Date Wed, 06 Jan 2016 11:59:39 GMT

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

Thomas Mueller commented on OAK-3834:
-------------------------------------

It looks like with a lease timeout set to 15 minutes, it is actually waiting 30 minutes before
taking over ({{2 * leaseTimeOut}}). Also, I'm not sure if the lease is always updated, if
there are few changes (due to {{indexStats.incUpdates() % 100 == 0}}):

{noformat}
        public void indexUpdate() throws CommitFailedException {
            if (indexStats.incUpdates() % 100 == 0) {
                long now = System.currentTimeMillis();
                if (now + leaseTimeOut > lease) {
                    long newLease = now + 2 * leaseTimeOut;
                    NodeBuilder builder = store.getRoot().builder();
                    builder.child(ASYNC).setProperty(leaseName, newLease);
                    mergeWithConcurrencyCheck(store, builder, checkpoint, lease, name);
                    lease = newLease;
                }
            }
        }
{noformat}

> 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)

Mime
View raw message