Author: adulceanu
Date: Wed Aug  9 12:48:00 2017
New Revision: 1804514

URL: http://svn.apache.org/viewvc?rev=1804514&view=rev
Log:
OAK-5902 - Cold standby should allow syncing of blobs bigger than 2.2 GB
Made blob chunk size configurable and fixed ITs

Modified:
    
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServer.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServerSync.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/store/StandbyStoreService.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/BrokenNetworkIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/DataStoreTestBase.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverIPRangeIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverMultipleClientsTestIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverSslTestIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/MBeanIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/RecoverTestIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/StandbyTestIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/TestBase.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/benchmark/BenchmarkBase.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/benchmark/BulkTransferBenchmark.java

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServer.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServer.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServer.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServer.java
 Wed Aug  9 12:48:00 2017
@@ -54,10 +54,9 @@ import org.slf4j.LoggerFactory;
 class StandbyServer implements AutoCloseable {
 
     private static final Logger log = 
LoggerFactory.getLogger(StandbyServer.class);
-    private static final int BLOB_CHUNK_SIZE = 1024 * 1024;
 
-    static Builder builder(int port, StoreProvider provider) {
-        return new Builder(port, provider);
+    static Builder builder(int port, StoreProvider provider, int 
blobChunkSize) {
+        return new Builder(port, provider, blobChunkSize);
     }
 
     private final int port;
@@ -77,6 +76,8 @@ class StandbyServer implements AutoClose
         private final int port;
 
         private final StoreProvider storeProvider;
+        
+        private final int blobChunkSize;
 
         private boolean secure;
 
@@ -86,9 +87,10 @@ class StandbyServer implements AutoClose
 
         private CommunicationObserver observer;
 
-        private Builder(final int port, final StoreProvider storeProvider) {
+        private Builder(final int port, final StoreProvider storeProvider, 
final int blobChunkSize) {
             this.port = port;
             this.storeProvider = storeProvider;
+            this.blobChunkSize = blobChunkSize;
         }
 
         Builder secure(boolean secure) {
@@ -165,7 +167,7 @@ class StandbyServer implements AutoClose
                 p.addLast(new SnappyFramedEncoder());
                 p.addLast(new GetHeadResponseEncoder());
                 p.addLast(new GetSegmentResponseEncoder());
-                p.addLast(new GetBlobResponseEncoder(BLOB_CHUNK_SIZE));
+                p.addLast(new GetBlobResponseEncoder(builder.blobChunkSize));
                 p.addLast(new GetReferencesResponseEncoder());
                 p.addLast(new ResponseObserverHandler(builder.observer));
 

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServerSync.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServerSync.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServerSync.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/server/StandbyServerSync.java
 Wed Aug  9 12:48:00 2017
@@ -48,6 +48,8 @@ public class StandbyServerSync implement
     private final String[] allowedClientIPRanges;
 
     private final boolean secure;
+    
+    private final int blobChunkSize;
 
     private volatile String state;
 
@@ -55,21 +57,22 @@ public class StandbyServerSync implement
 
     private StandbyServer server;
 
-    public StandbyServerSync(final int port, final FileStore fileStore) {
-        this(port, fileStore, null, false);
+    public StandbyServerSync(final int port, final FileStore fileStore, final 
int blobChunkSize) {
+        this(port, fileStore, blobChunkSize, null, false);
     }
 
-    public StandbyServerSync(final int port, final FileStore fileStore, final 
boolean secure) {
-        this(port, fileStore, null, secure);
+    public StandbyServerSync(final int port, final FileStore fileStore, final 
int blobChunkSize, final boolean secure) {
+        this(port, fileStore, blobChunkSize, null, secure);
     }
 
-    public StandbyServerSync(final int port, final FileStore fileStore, final 
String[] allowedClientIPRanges) {
-        this(port, fileStore, allowedClientIPRanges, false);
+    public StandbyServerSync(final int port, final FileStore fileStore, final 
int blobChunkSize, final String[] allowedClientIPRanges) {
+        this(port, fileStore, blobChunkSize, allowedClientIPRanges, false);
     }
 
-    public StandbyServerSync(final int port, final FileStore fileStore, final 
String[] allowedClientIPRanges, final boolean secure) {
+    public StandbyServerSync(final int port, final FileStore fileStore, final 
int blobChunkSize, final String[] allowedClientIPRanges, final boolean secure) {
         this.port = port;
         this.fileStore = fileStore;
+        this.blobChunkSize = blobChunkSize;
         this.allowedClientIPRanges = allowedClientIPRanges;
         this.secure = secure;
         this.observer = new CommunicationObserver("primary");
@@ -102,7 +105,7 @@ public class StandbyServerSync implement
         state = STATUS_STARTING;
 
         try {
-            server = StandbyServer.builder(port, this)
+            server = StandbyServer.builder(port, this, blobChunkSize)
                     .secure(secure)
                     .allowIPRanges(allowedClientIPRanges)
                     .withStateConsumer(this)

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=1804514&r1=1804513&r2=1804514&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
 Wed Aug  9 12:48:00 2017
@@ -86,6 +86,11 @@ 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;
 
@@ -137,8 +142,9 @@ 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, ranges, secure);
+        StandbyServerSync standbyServerSync = new StandbyServerSync(port, 
fileStore, blobChunkSize, ranges, secure);
         closer.register(standbyServerSync);
         standbyServerSync.start();
 

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/BrokenNetworkIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/BrokenNetworkIT.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/BrokenNetworkIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/BrokenNetworkIT.java
 Wed Aug  9 12:48:00 2017
@@ -154,7 +154,7 @@ public class BrokenNetworkIT extends Tes
         storeS.flush();  // this speeds up the test a little bit...
 
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, ssl);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, 1 * MB, ssl);
                 StandbyClientSync clientSync = newStandbyClientSync(storeC, 
proxyPort.getPort(), ssl);
         ) {
             proxy.skipBytes(skipPosition, skipBytes);

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/DataStoreTestBase.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/DataStoreTestBase.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/DataStoreTestBase.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/DataStoreTestBase.java
 Wed Aug  9 12:48:00 2017
@@ -51,8 +51,6 @@ import org.junit.Test;
 
 public abstract class DataStoreTestBase extends TestBase {
 
-    private static final int MB = 1024 * 1024;
-
     private NetworkErrorProxy proxy;
 
     @Rule
@@ -101,7 +99,7 @@ public abstract class DataStoreTestBase
         NodeStore store = SegmentNodeStoreBuilders.builder(primary).build();
         byte[] data = addTestContent(store, "server", blobSize);
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), primary);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), primary, 1 * MB);
                 StandbyClientSync cl = newStandbyClientSync(secondary, 
serverPort.getPort())
         ) {
             serverSync.start();
@@ -136,7 +134,7 @@ public abstract class DataStoreTestBase
 
         NodeStore store = SegmentNodeStoreBuilders.builder(primary).build();
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), primary);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), primary, 1 * MB);
                 StandbyClientSync clientSync = newStandbyClientSync(secondary, 
serverPort.getPort())
         ) {
             serverSync.start();
@@ -196,7 +194,7 @@ public abstract class DataStoreTestBase
         NodeStore store = SegmentNodeStoreBuilders.builder(primary).build();
         byte[] data = addTestContent(store, "server", blobSize);
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), primary);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), primary, 1 * MB);
                 StandbyClientSync clientSync = newStandbyClientSync(secondary, 
proxyPort.getPort())
         ) {
             proxy.skipBytes(skipPosition, skipBytes);

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverIPRangeIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverIPRangeIT.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverIPRangeIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverIPRangeIT.java
 Wed Aug  9 12:48:00 2017
@@ -157,7 +157,7 @@ public class FailoverIPRangeIT extends T
 
         NodeStore store = SegmentNodeStoreBuilders.builder(storeS).build();
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, ipRanges);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, 1 * MB, ipRanges);
                 StandbyClientSync clientSync = new StandbyClientSync(host, 
serverPort.getPort(), storeC, false, getClientTimeout(), false)
         ) {
             serverSync.start();

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverMultipleClientsTestIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverMultipleClientsTestIT.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverMultipleClientsTestIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverMultipleClientsTestIT.java
 Wed Aug  9 12:48:00 2017
@@ -63,7 +63,7 @@ public class FailoverMultipleClientsTest
 
         NodeStore store = SegmentNodeStoreBuilders.builder(storeS).build();
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, 1 * MB);
                 StandbyClientSync cl1 = newStandbyClientSync(storeC, 
serverPort.getPort());
                 StandbyClientSync cl2 = newStandbyClientSync(storeC2, 
serverPort.getPort())
         ) {

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverSslTestIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverSslTestIT.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverSslTestIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/FailoverSslTestIT.java
 Wed Aug  9 12:48:00 2017
@@ -58,7 +58,7 @@ public class FailoverSslTestIT extends T
         FileStore storeS = serverFileStore.fileStore();
         FileStore storeC = clientFileStore.fileStore();
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, true);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, 1 * MB, true);
                 StandbyClientSync clientSync = newStandbyClientSync(storeC, 
serverPort.getPort(), true);
         ) {
             assertTrue(synchronizeAndCompareHead(serverSync, clientSync));
@@ -70,7 +70,7 @@ public class FailoverSslTestIT extends T
         FileStore storeS = serverFileStore.fileStore();
         FileStore storeC = clientFileStore.fileStore();
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, true);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, 1 * MB, true);
                 StandbyClientSync clientSync = newStandbyClientSync(storeC, 
serverPort.getPort());
         ) {
             assertFalse(synchronizeAndCompareHead(serverSync, clientSync));
@@ -82,7 +82,7 @@ public class FailoverSslTestIT extends T
         FileStore storeS = serverFileStore.fileStore();
         FileStore storeC = clientFileStore.fileStore();
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, 1 * MB);
                 StandbyClientSync clientSync = newStandbyClientSync(storeC, 
serverPort.getPort(), true);
         ) {
             assertFalse(synchronizeAndCompareHead(serverSync, clientSync));

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/MBeanIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/MBeanIT.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/MBeanIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/MBeanIT.java
 Wed Aug  9 12:48:00 2017
@@ -61,7 +61,7 @@ public class MBeanIT extends TestBase {
     public void testServerEmptyConfig() throws Exception {
         MBeanServer jmxServer = ManagementFactory.getPlatformMBeanServer();
         ObjectName status = new ObjectName(StandbyStatusMBean.JMX_NAME + 
",id=*");
-        try (StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), serverFileStore.fileStore())) {
+        try (StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), serverFileStore.fileStore(), 1 * MB)) {
             serverSync.start();
 
             Set<ObjectName> instances = jmxServer.queryNames(status, null);
@@ -153,7 +153,7 @@ public class MBeanIT extends TestBase {
         MBeanServer jmxServer = ManagementFactory.getPlatformMBeanServer();
         ObjectName clientStatus, serverStatus;
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), serverFileStore.fileStore());
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), serverFileStore.fileStore(), 1 * MB);
                 StandbyClientSync clientSync = 
newStandbyClientSync(clientFileStore.fileStore(), serverPort.getPort())
         ) {
             serverSync.start();

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/RecoverTestIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/RecoverTestIT.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/RecoverTestIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/RecoverTestIT.java
 Wed Aug  9 12:48:00 2017
@@ -62,7 +62,7 @@ public class RecoverTestIT extends TestB
         addTestContent(store, "client");
 
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), storeS, 1 * MB);
                 StandbyClientSync cl = newStandbyClientSync(storeC, 
serverPort.getPort())
         ) {
             serverSync.start();

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/StandbyTestIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/StandbyTestIT.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/StandbyTestIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/StandbyTestIT.java
 Wed Aug  9 12:48:00 2017
@@ -72,7 +72,7 @@ public class StandbyTestIT extends TestB
 
         NodeStore store = SegmentNodeStoreBuilders.builder(primary).build();
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), primary);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), primary, 1 * MB);
                 StandbyClientSync clientSync = newStandbyClientSync(secondary, 
serverPort.getPort())
         ) {
             serverSync.start();
@@ -112,7 +112,7 @@ public class StandbyTestIT extends TestB
 
         NodeStore store = SegmentNodeStoreBuilders.builder(primary).build();
         try (
-                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), primary);
+                StandbyServerSync serverSync = new 
StandbyServerSync(serverPort.getPort(), primary, 1 * MB);
                 StandbyClientSync clientSync = newStandbyClientSync(secondary, 
serverPort.getPort())
         ) {
             serverSync.start();

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/TestBase.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/TestBase.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/TestBase.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/TestBase.java
 Wed Aug  9 12:48:00 2017
@@ -28,7 +28,7 @@ import org.apache.jackrabbit.oak.segment
 import org.junit.BeforeClass;
 
 public class TestBase {
-
+    static final int MB = 1024 * 1024;
     private static final int timeout = 
Integer.getInteger("standby.test.timeout", 500);
 
     // Java 6 on Windows doesn't support dual IP stacks, so we will skip our

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/benchmark/BenchmarkBase.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/benchmark/BenchmarkBase.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/benchmark/BenchmarkBase.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/benchmark/BenchmarkBase.java
 Wed Aug  9 12:48:00 2017
@@ -35,7 +35,7 @@ import org.apache.jackrabbit.oak.stats.D
 public class BenchmarkBase {
     static final int port = Integer.getInteger("standby.server.port", 52800);
     static final String LOCALHOST = "127.0.0.1";
-
+    static final int MB = 1024 * 1024;
     static final int timeout = Integer.getInteger("standby.test.timeout", 500);
 
     File directoryS;

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/benchmark/BulkTransferBenchmark.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/benchmark/BulkTransferBenchmark.java?rev=1804514&r1=1804513&r2=1804514&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/benchmark/BulkTransferBenchmark.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/benchmark/BulkTransferBenchmark.java
 Wed Aug  9 12:48:00 2017
@@ -91,7 +91,7 @@ public class BulkTransferBenchmark exten
         store.merge(rootbuilder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
         storeS.flush();
 
-        final StandbyServerSync serverSync = new StandbyServerSync(port, 
storeS, useSSL);
+        final StandbyServerSync serverSync = new StandbyServerSync(port, 
storeS, 1 * MB, useSSL);
         serverSync.start();
 
         System.setProperty(StandbyClientSync.CLIENT_ID_PROPERTY_NAME, "Bar");


Reply via email to