Thomas Mueller created OAK-11878:
------------------------------------

             Summary: ClusterNodeStoreLock LOCK_TIMEOUT is too large
                 Key: OAK-11878
                 URL: https://issues.apache.org/jira/browse/OAK-11878
             Project: Jackrabbit Oak
          Issue Type: Improvement
            Reporter: Thomas Mueller


If index-import fails (eg. the process is killed) then async indexing is 
blocked for 100 days, unless someone breaks the lock manually.

I think 6 hours is better because:
* Usually a "diff" of 6 hours works fine, but beyond that it gets harder and 
harder for the document store.
* The longest index import phase I have seen is 2.5 hours, for a ~2 billion 
nodes repository, indexing many indexes in one go.

oak-core
package org.apache.jackrabbit.oak.plugins.index.importer
{noformat}
/**
 * Lock implementation for clustered scenario. The locking is done
 * by setting the lease time for the lane to distant future which
 * prevent AsyncIndexUpdate from  running.
 */
public class ClusterNodeStoreLock implements 
AsyncIndexerLock<ClusteredLockToken>
    /**
     * Use a looong lease time to ensure that async indexer does not start
     * in between the import process which can take some time
     */
    private static final long LOCK_TIMEOUT = TimeUnit.DAYS.toMillis(100);
{noformat}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to