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 mr...@apache.org on 2016/07/07 08:12:20 UTC
svn commit: r1751755 - in /jackrabbit/oak/trunk/oak-core/src:
main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
Author: mreutegg
Date: Thu Jul 7 08:12:20 2016
New Revision: 1751755
URL: http://svn.apache.org/viewvc?rev=1751755&view=rev
Log:
OAK-4545: Configurable maxBackOffMillis
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java?rev=1751755&r1=1751754&r2=1751755&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java Thu Jul 7 08:12:20 2016
@@ -194,7 +194,8 @@ public final class DocumentNodeStore
* The maximum back off time in milliseconds when merges are retried. The
* default value is twice the {@link #asyncDelay}.
*/
- protected int maxBackOffMillis = asyncDelay * 2;
+ protected int maxBackOffMillis =
+ Integer.getInteger("oak.maxBackOffMS", asyncDelay * 2);
/**
* Whether this instance is disposed.
Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java?rev=1751755&r1=1751754&r2=1751755&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java Thu Jul 7 08:12:20 2016
@@ -1589,6 +1589,18 @@ public class DocumentNodeStoreTest {
}
+ // OAK-4545
+ @Test
+ public void configurableMaxBackOffMillis() throws Exception {
+ System.setProperty("oak.maxBackOffMS", "1234");
+ try {
+ DocumentNodeStore ns = builderProvider.newBuilder().getNodeStore();
+ assertEquals(1234, ns.getMaxBackOffMillis());
+ } finally {
+ System.clearProperty("oak.maxBackOffMS");
+ }
+ }
+
// OAK-3579
@Test
public void backgroundLeaseUpdateThread() throws Exception {