You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ju...@apache.org on 2014/04/15 07:50:36 UTC

svn commit: r1587430 - /jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/OakDirectory.java

Author: jukka
Date: Tue Apr 15 05:50:36 2014
New Revision: 1587430

URL: http://svn.apache.org/r1587430
Log:
OAK-1724: Enable copying of Lucene index to local file system for read queries

Decrease the blob entry size to below the SegmentMK inline limit to ensure good performance even when using the SegmentMK with an external Data/BlobStore.

Modified:
    jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/OakDirectory.java

Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/OakDirectory.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/OakDirectory.java?rev=1587430&r1=1587429&r2=1587430&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/OakDirectory.java (original)
+++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/OakDirectory.java Tue Apr 15 05:50:36 2014
@@ -133,7 +133,14 @@ class OakDirectory extends Directory {
         return lockFactory;
     }
 
-    private static final int BLOB_SIZE = 32 * 1024; // > blob inline limit
+    /**
+     * Size of the blob entries to which the Lucene files are split.
+     * Set to higher than the 4kB inline limit for the BlobStore, but
+     * just below the 16+kB inline limit in the SegmentMK. This way the
+     * Lucene index gets stored in the SegmentMK segments for best performance
+     * even when an external Data/BlobStore is being used for normal binaries.
+     */
+    private static final int BLOB_SIZE = 16 * 1024;
 
     private static class OakIndexFile {