Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
At times following warning is seen in logs
31.03.2015 14:04:57.610 *WARN* [pool-6-thread-7] org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier Found local copy for _0.cfs in NIOFSDirectory@/path/to/index/e5a943cdec3000bd8ce54924fd2070ab5d1d35b9ecf530963a3583d43bf28293/1 lockFactory=NativeFSLockFactory@/path/to/index/e5a943cdec3000bd8ce54924fd2070ab5d1d35b9ecf530963a3583d43bf28293/1 but size of local 1040384 differs from remote 1958385. Content would be read from remote file only
The file length check provides a weak check around index file consistency. In some cases this warning is misleading. For e.g.
- Index version Rev1 - Task submitted to copy index file F1
- Index updated to Rev2 - Directory bound to Rev1 is closed
- Read is performed with Rev2 for F1 - Here as the file would be locally created the size would be different as the copying is in progress
In such a case the logic should ensure that once copy is done the local file gets used