[ https://issues.apache.org/jira/browse/OAK-3834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085333#comment-15085333 ]
Thomas Mueller commented on OAK-3834: ------------------------------------- When closing the repository normally (stopping the bundle), then the lease should be removed. Only when killing the process, the lease is left behind. We should probably add a info level log message when removing the lease so we can better understand what is going on. The async lease is an additional safety feature to ensure the index is not updated concurrently, which would cause index corruption. The async lease is not strictly needed if discovery is working properly, however in the past we did see cases where it was not working properly (for example due to slow observation processing). Other problems could be system time not synchronized between cluster nodes. Changing the lease timeout to 1 minute is dangerous right now, because the lease is only renewed after async index updated, and that can take some time. It would be much better to update the lease in a separate thread. Once we have done that (and if that is working properly), we could use a very short lease timeout. > 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)