Julian,

Could you try with the attached patch?

Michael

On 10.12.14 11:40 , Julian Reschke wrote:
On 2014-12-10 21:15, Michael Dürig wrote:


On 10.12.14 7:59 , Julian Reschke wrote:
segmentOverflow(org.apache.jackrabbit.oak.plugins.segment.file.FileStoreTest):



 The process cannot access the file because another process has locked
a portion
 of the file



Maybe related to this change?

Probably yes. As I can't reproduce this, could you send a stack trace?

Michael

This one?

Index: 
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- 
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
        (revision a696d59bf31c2c3870f63ed32bf069d625b292b1)
+++ 
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
        (revision )
@@ -187,8 +187,6 @@
         this.memoryMapping = memoryMapping;
 
         journalFile = new RandomAccessFile(new File(directory, 
JOURNAL_FILE_NAME), "rw");
-        journalFile.seek(journalFile.length());
-        journalLock = journalFile.getChannel().lock();
 
         Map<Integer, Map<Character, File>> map = collectFiles(directory);
         this.readers = newArrayListWithCapacity(map.size());
@@ -226,6 +224,9 @@
         } finally {
             journalReader.close();
         }
+
+        journalFile.seek(journalFile.length());
+        journalLock = journalFile.getChannel().lock();
 
         if (id != null) {
             head = new AtomicReference<RecordId>(id);

Reply via email to