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 ad...@apache.org on 2017/10/24 07:31:05 UTC

svn commit: r1813147 - /jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java

Author: adulceanu
Date: Tue Oct 24 07:31:05 2017
New Revision: 1813147

URL: http://svn.apache.org/viewvc?rev=1813147&view=rev
Log:
OAK-6626 - Replace standby blob chunk size configuration with feature flag

Modified:
    jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java

Modified: jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java?rev=1813147&r1=1813146&r2=1813147&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java (original)
+++ jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java Tue Oct 24 07:31:05 2017
@@ -87,11 +87,6 @@ public class StandbyStoreService {
     @Property(boolValue = SECURE_DEFAULT)
     public static final String SECURE = "secure";
     
-    public static final int BLOB_CHUNK_SIZE_DEFAULT = 1024 * 1024;
-
-    @Property(intValue = BLOB_CHUNK_SIZE_DEFAULT)
-    public static final String BLOB_CHUNK_SIZE = "blob.chunkSize";
-
     public static final int READ_TIMEOUT_DEFAULT = 60000;
 
     @Property(intValue = READ_TIMEOUT_DEFAULT)
@@ -104,6 +99,8 @@ public class StandbyStoreService {
 
     @Reference(policy = STATIC, policyOption = GREEDY)
     private SegmentStoreProvider storeProvider = null;
+    
+    private static final int BLOB_CHUNK_SIZE = Integer.getInteger("oak.standby.blob.chunkSize", 1024 * 1024);
 
     private final Closer closer = Closer.create();
 
@@ -142,9 +139,8 @@ public class StandbyStoreService {
         int port = PropertiesUtil.toInteger(props.get(PORT), PORT_DEFAULT);
         String[] ranges = PropertiesUtil.toStringArray(props.get(ALLOWED_CLIENT_IP_RANGES), ALLOWED_CLIENT_IP_RANGES_DEFAULT);
         boolean secure = PropertiesUtil.toBoolean(props.get(SECURE), SECURE_DEFAULT);
-        int blobChunkSize = PropertiesUtil.toInteger(props.get(BLOB_CHUNK_SIZE), BLOB_CHUNK_SIZE_DEFAULT);
 
-        StandbyServerSync standbyServerSync = new StandbyServerSync(port, fileStore, blobChunkSize, ranges, secure);
+        StandbyServerSync standbyServerSync = new StandbyServerSync(port, fileStore, BLOB_CHUNK_SIZE, ranges, secure);
         closer.register(standbyServerSync);
         standbyServerSync.start();