(jackrabbit-oak) branch trunk updated: OAK-9796: oak-segment-remote Redis tests fail with ARM processor (Apple M1)

2023-11-20 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 9a3deea518 OAK-9796: oak-segment-remote Redis tests fail with ARM 
processor (Apple M1)
 new e568fe4f19 Merge pull request #1221 from mreutegg/OAK-9796-2
9a3deea518 is described below

commit 9a3deea518be34ebd6754a025f60dc9181c373cd
Author: Marcel Reutegger 
AuthorDate: Mon Nov 20 12:06:09 2023 +0100

OAK-9796: oak-segment-remote Redis tests fail with ARM processor (Apple M1)

Skip test if redis cannot be started
---
 .../segment/remote/persistentcache/PersistentRedisCacheTest.java   | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/PersistentRedisCacheTest.java
 
b/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/PersistentRedisCacheTest.java
index 2df5d85024..17804ed195 100644
--- 
a/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/PersistentRedisCacheTest.java
+++ 
b/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/PersistentRedisCacheTest.java
@@ -20,6 +20,7 @@ package 
org.apache.jackrabbit.oak.segment.remote.persistentcache;
 import org.apache.jackrabbit.oak.commons.Buffer;
 import org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitorAdapter;
 import org.junit.After;
+import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -55,7 +56,11 @@ public class PersistentRedisCacheTest extends 
AbstractPersistentCacheTest {
 Path redisTargetExecutable = new File("target", 
redisTempExecutable.getFileName().toString()).toPath();
 Files.copy(redisTempExecutable, redisTargetExecutable, 
StandardCopyOption.REPLACE_EXISTING);
 redisServer = RedisServer.newRedisServer().setting("maxmemory 
768mb").bind(REDIS_HOST).executableProvider(redisTargetExecutable::toFile).build();
-redisServer.start();
+try {
+redisServer.start();
+} catch (IOException e) {
+Assume.assumeNoException(e);
+}
 int port = redisServer.ports().get(0);
 ioMonitorAdapter = mock(IOMonitorAdapter.class);
 



(jackrabbit-oak) branch trunk updated: OAK-9796: oak-segment-remote Redis tests fail with ARM processor (Apple M1)

2023-11-17 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new e3dfba82dd OAK-9796: oak-segment-remote Redis tests fail with ARM 
processor (Apple M1)
 new 90d595d028 Merge pull request #1218 from mreutegg/OAK-9796
e3dfba82dd is described below

commit e3dfba82dd2f8b697c19895746836e446f06d9cb
Author: Marcel Reutegger 
AuthorDate: Thu Nov 16 12:06:12 2023 +0100

OAK-9796: oak-segment-remote Redis tests fail with ARM processor (Apple M1)

Switch to more recent version of embedded-redis
---
 oak-segment-remote/pom.xml   |  4 ++--
 .../remote/persistentcache/PersistentRedisCacheTest.java | 16 
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/oak-segment-remote/pom.xml b/oak-segment-remote/pom.xml
index 04385ccdd6..0be3392cdb 100644
--- a/oak-segment-remote/pom.xml
+++ b/oak-segment-remote/pom.xml
@@ -151,9 +151,9 @@
 test
 
 
-com.github.kstyrc
+com.github.codemonstur
 embedded-redis
-0.6
+1.0.0
 test
 
 
diff --git 
a/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/PersistentRedisCacheTest.java
 
b/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/PersistentRedisCacheTest.java
index c8bf3f3c5d..2df5d85024 100644
--- 
a/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/PersistentRedisCacheTest.java
+++ 
b/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/PersistentRedisCacheTest.java
@@ -23,10 +23,11 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import redis.embedded.RedisExecProvider;
 import redis.embedded.RedisServer;
+import redis.embedded.core.ExecutableProviderBuilder;
 
 import java.io.File;
+import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.StandardCopyOption;
@@ -40,27 +41,26 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
 
 public class PersistentRedisCacheTest extends AbstractPersistentCacheTest {
 
+private static final String REDIS_HOST = "127.0.0.1";
+
 private RedisServer redisServer;
 private IOMonitorAdapter ioMonitorAdapter;
 
 @Before
 public void setUp() throws Exception {
-Path redisTempExecutable = 
RedisExecProvider.defaultProvider().get().toPath();
+Path redisTempExecutable = new 
ExecutableProviderBuilder().addProvidedVersions().build().get().toPath();
 Path redisTargetExecutable = new File("target", 
redisTempExecutable.getFileName().toString()).toPath();
 Files.copy(redisTempExecutable, redisTargetExecutable, 
StandardCopyOption.REPLACE_EXISTING);
-RedisExecProvider execProvider = mock(RedisExecProvider.class);
-when(execProvider.get()).thenReturn(redisTargetExecutable.toFile());
-redisServer = RedisServer.builder().setting("maxmemory 
768mb").redisExecProvider(execProvider).build();
+redisServer = RedisServer.newRedisServer().setting("maxmemory 
768mb").bind(REDIS_HOST).executableProvider(redisTargetExecutable::toFile).build();
 redisServer.start();
 int port = redisServer.ports().get(0);
 ioMonitorAdapter = mock(IOMonitorAdapter.class);
 
 persistentCache = new PersistentRedisCache(
-"localhost",
+REDIS_HOST,
 port,
 -1,
 1,
@@ -74,7 +74,7 @@ public class PersistentRedisCacheTest extends 
AbstractPersistentCacheTest {
 }
 
 @After
-public void tearDown() {
+public void tearDown() throws IOException {
 redisServer.stop();
 }
 



[jackrabbit-oak] branch trunk updated: OAK-10514: Utility method to remove unmerged branch changes

2023-10-24 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new b0ec30536f OAK-10514: Utility method to remove unmerged branch changes
 new 9377d05a39 Merge pull request #1173 from mreutegg/OAK-10514
b0ec30536f is described below

commit b0ec30536f7466c24b6d4e98364cef0b671a0491
Author: Marcel Reutegger 
AuthorDate: Thu Oct 19 17:25:40 2023 +0200

OAK-10514: Utility method to remove unmerged branch changes
---
 oak-run/src/main/js/oak-mongo.js | 77 
 1 file changed, 77 insertions(+)

diff --git a/oak-run/src/main/js/oak-mongo.js b/oak-run/src/main/js/oak-mongo.js
index 4b9519b7af..8f8d264e7e 100644
--- a/oak-run/src/main/js/oak-mongo.js
+++ b/oak-run/src/main/js/oak-mongo.js
@@ -520,6 +520,83 @@ var oak = (function(global){
 }
 };
 
+/**
+ * Removes unmerged branch changes on the document with the given path
+ * and clusterId. This method will only remove unmerged branch changes when
+ * the clusterId is inactive.
+ * On big documents with write contention it is advisable to limit the
+ * number of unmerged branch changes to remove in one go. Otherwise MongoDB
+ * may have difficulties applying the change to the document.
+ *
+ * @memberof oak
+ * @method removeUnmergedBranchChanges
+ * @param {string} path the path of a document
+ * @param {number} clusterId unmerged branch changes for this clusterId 
will be removed.
+ * @param {number} [limit=100] maximum number of unmerged branches to 
remove.
+ * @returns {object} the result of the MongoDB update.
+ */
+api.removeUnmergedBranchChanges = function(path, clusterId, limit) {
+if (path === undefined) {
+print("No path specified");
+return;
+}
+if (clusterId === undefined) {
+print("No clusterId specified");
+return;
+}
+if (limit === undefined) {
+limit = 100;
+}
+// refuse to remove when clusterId is marked active
+var clusterNode = db.clusterNodes.findOne({_id: clusterId.toString()});
+if (clusterNode && clusterNode.state == "ACTIVE") {
+print("Cluster node with id " + clusterId + " is active!");
+print("Can only remove unmerged branches for inactive cluster 
node.");
+return;
+}
+
+var doc = this.findOne(path);
+if (!doc) {
+print("No document for path: " + path);
+return;
+}
+var unset = {};
+var r;
+var num = 0;
+for (r in doc._bc) {
+if (new Revision(r).getClusterId() != clusterId) {
+continue;
+}
+
+var commitValue = this.getCommitValue("/", r)
+if (commitValue && commitValue[r] && 
commitValue[r].startsWith("c-")) {
+print("Branch change " + r + " is not garbage");
+continue;
+}
+
+for (var key in doc) {
+if (doc.hasOwnProperty(key) && doc[key][r]) {
+unset[key + "." + r] = "";
+}
+}
+num++;
+
+if (num >= limit) {
+break;
+}
+}
+if (num > 0) {
+var update = {};
+update["$inc"] = {_modCount: NumberLong(1)};
+update["$unset"] = unset;
+print("Removing " + num + " unmerged branches for clusterId " + 
clusterId);
+// print(JSON.stringify(update));
+return db.nodes.update({_id: pathDepth(path) + ":" + path}, 
update);
+} else {
+print("No unmerged branches found for clusterId " + clusterId);
+}
+};
+
 /**
  * Finds the document with the given path.
  *



[jackrabbit-oak] branch trunk updated (09aaa8164f -> f4b86c806d)

2023-09-05 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 09aaa8164f Merge pull request #1100 from mreutegg/OAK-10425
 new 634cb27d07 OAK-10413: DocumentStoreIndexerIT hanging
 new 0be1b75008 Merge branch 'trunk' into OAK-10413
 new f4b86c806d Merge pull request #1099 from mreutegg/OAK-10413

The 18766 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/jackrabbit/oak/indexversion/PurgeOldIndexVersionIT.java  | 2 ++
 1 file changed, 2 insertions(+)



[jackrabbit-oak] branch trunk updated: OAK-10425: Ability to remove mixin type without read permission on jcr:mixinTypes property

2023-09-05 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 757553face OAK-10425: Ability to remove mixin type without read 
permission on jcr:mixinTypes property
 new 09aaa8164f Merge pull request #1100 from mreutegg/OAK-10425
757553face is described below

commit 757553faceabac62093b7e62669d2c6fb8a69759
Author: Marcel Reutegger 
AuthorDate: Tue Sep 5 08:40:52 2023 +0200

OAK-10425: Ability to remove mixin type without read permission on 
jcr:mixinTypes property

Add ignored test
---
 oak-jcr/pom.xml|  3 +++
 .../security/authorization/ReadPropertyTest.java   | 25 ++
 2 files changed, 28 insertions(+)

diff --git a/oak-jcr/pom.xml b/oak-jcr/pom.xml
index ef2b88e172..6748ca36e8 100644
--- a/oak-jcr/pom.xml
+++ b/oak-jcr/pom.xml
@@ -149,6 +149,9 @@
   org.apache.jackrabbit.core.query.ShareableNodeTest#testName  
  
   org.apache.jackrabbit.core.query.ShareableNodeTest#testPathConstraint
  
   org.apache.jackrabbit.oak.jcr.query.QueryTest#fnNameEncoding 
  
+
+  
+  
org.apache.jackrabbit.oak.jcr.security.authorization.ReadPropertyTest#testRemoveMixinType
  
 
   
 
diff --git 
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
 
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
index 25188337c1..01d5cf6eae 100644
--- 
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
+++ 
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
@@ -217,6 +217,31 @@ public class ReadPropertyTest extends 
AbstractEvaluationTest {
 assertMixinTypes(superuser.getNode(path), MIX_REFERENCEABLE, 
MIX_REP_ACCESS_CONTROLLABLE, mixTitle);
 }
 
+@Test // (OAK-10425) ignored and marked as known issue in pom.xml
+public void testRemoveMixinType() throws Exception {
+String mixTitle = "mix:title";
+superuser.getNode(path).addMixin(mixTitle);
+superuser.getNode(path).addMixin(MIX_REFERENCEABLE);
+superuser.save();
+
+deny(path, privilegesFromName(PrivilegeConstants.JCR_READ));
+allow(path, privilegesFromName(PrivilegeConstants.REP_READ_NODES));
+allow(path, privilegesFromName(PrivilegeConstants.REP_WRITE));
+
+assertMixinTypes(superuser.getNode(path), mixTitle, MIX_REFERENCEABLE, 
MIX_REP_ACCESS_CONTROLLABLE);
+
+Node node = testSession.getNode(path);
+assertFalse(node.hasProperty(JcrConstants.JCR_MIXINTYPES));
+
+// must be able to remove mixin even if session
+// does not have permission to read jcr:mixinTypes
+node.removeMixin(mixTitle);
+testSession.save();
+
+// we should be able to see two mixin types
+assertMixinTypes(superuser.getNode(path), MIX_REFERENCEABLE, 
MIX_REP_ACCESS_CONTROLLABLE);
+}
+
 private void assertMixinTypes(Node node, String... mixins)
 throws RepositoryException {
 Set expected = 
Arrays.stream(mixins).collect(Collectors.toSet());



[jackrabbit-oak] branch trunk updated: OAK-10427: Clear cache on NodeDocumentCache close

2023-09-05 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 42eee1060b OAK-10427: Clear cache on NodeDocumentCache close
 new a90f97d02a Merge pull request #1098 from mreutegg/OAK-10427
42eee1060b is described below

commit 42eee1060b44ce85c5b7c3a4d60956bb9b630c28
Author: Marcel Reutegger 
AuthorDate: Mon Sep 4 17:54:35 2023 +0200

OAK-10427: Clear cache on NodeDocumentCache close
---
 .../apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCache.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCache.java
 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCache.java
index d05f38a3cf..8ff1d717a2 100644
--- 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCache.java
+++ 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCache.java
@@ -340,9 +340,11 @@ public class NodeDocumentCache implements Closeable {
 
 @Override
 public void close() throws IOException {
+prevDocumentsCache.invalidateAll();
 if (prevDocumentsCache instanceof Closeable) {
 ((Closeable) prevDocumentsCache).close();
 }
+nodeDocumentsCache.invalidateAll();
 if (nodeDocumentsCache instanceof Closeable) {
 ((Closeable) nodeDocumentsCache).close();
 }



[jackrabbit-oak] branch trunk updated (5ee4afcaa9 -> dcb47fc0bc)

2023-09-04 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 5ee4afcaa9 OAK-10419: Release Oak 1.56.0  - fix project versions
 new 2c83efbefc OAK-10334: Node.addMixin() may overwrite existing mixins
 new 0b8223f113 OAK-10334: Node.addMixin() may overwrite existing mixins
 new cf521f072e Merge branch 'trunk' into OAK-10334
 new 028e8d3618 OAK-10334: Node.addMixin() may overwrite existing mixins
 new 46109d1d84 Merge branch 'trunk' into OAK-10334
 new e91361faa5 Merge branch 'trunk' into OAK-10334
 new dcb47fc0bc Merge pull request #1011 from mreutegg/OAK-10334

The 18758 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../jackrabbit/oak/jcr/delegate/NodeDelegate.java  |  6 +--
 .../jackrabbit/oak/jcr/session/NodeImpl.java   | 13 +++---
 .../security/authorization/ReadPropertyTest.java   | 48 ++
 .../jackrabbit/oak/plugins/tree/TreeUtil.java  | 43 ++-
 .../jackrabbit/oak/plugins/tree/package-info.java  |  2 +-
 5 files changed, 100 insertions(+), 12 deletions(-)



[jackrabbit-oak] branch trunk updated: OAK-10357: Path option for documentstore-check

2023-08-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 5b05f24ecb OAK-10357: Path option for documentstore-check
 new 9299e4f8f1 Merge pull request #1031 from mreutegg/OAK-10357
5b05f24ecb is described below

commit 5b05f24ecb02fe15ab9053e8a6230a2ef7689c24
Author: Marcel Reutegger 
AuthorDate: Tue Jul 18 13:51:44 2023 +0200

OAK-10357: Path option for documentstore-check
---
 .../plugins/document/check/DocumentStoreCheck.java | 30 ++---
 .../oak/run/DocumentStoreCheckCommand.java | 11 
 .../oak/run/DocumentStoreCheckCommandTest.java | 31 ++
 3 files changed, 69 insertions(+), 3 deletions(-)

diff --git 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
index 7bcaf171a1..d5804088b6 100644
--- 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
+++ 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
@@ -24,6 +24,7 @@ import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -31,15 +32,18 @@ import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.function.Consumer;
+import java.util.stream.Collectors;
 
 import org.apache.jackrabbit.guava.common.io.Closer;
 
 import org.apache.jackrabbit.oak.commons.concurrent.ExecutorCloser;
 import org.apache.jackrabbit.oak.commons.json.JsopBuilder;
+import org.apache.jackrabbit.oak.plugins.document.Collection;
 import org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore;
 import org.apache.jackrabbit.oak.plugins.document.DocumentStore;
 import org.apache.jackrabbit.oak.plugins.document.NodeDocument;
 import org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore;
+import org.apache.jackrabbit.oak.plugins.document.util.Utils;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.apache.jackrabbit.JcrConstants.JCR_BASEVERSION;
@@ -91,6 +95,8 @@ public class DocumentStoreCheck {
 
 private final boolean consistency;
 
+private final List paths;
+
 private DocumentStoreCheck(DocumentNodeStore ns,
DocumentStore store,
Closer closer,
@@ -106,7 +112,8 @@ public class DocumentStoreCheck {
boolean predecessors,
boolean successors,
boolean uuid,
-   boolean consistency) {
+   boolean consistency,
+   List paths) {
 this.ns = ns;
 this.store = store;
 this.closer = closer;
@@ -129,6 +136,7 @@ public class DocumentStoreCheck {
 this.successors = successors;
 this.uuid = uuid;
 this.consistency = consistency;
+this.paths = paths;
 }
 
 public void run() throws Exception {
@@ -136,7 +144,7 @@ public class DocumentStoreCheck {
 scheduleResultWriter(results);
 
 DocumentProcessor processor = createDocumentProcessor();
-for (NodeDocument doc : getAllDocs(store)) {
+for (NodeDocument doc : paths.isEmpty() ? getAllDocs(store) : 
getDocs(store, paths)) {
 processor.processDocument(doc, results);
 }
 processor.end(results);
@@ -233,6 +241,14 @@ public class DocumentStoreCheck {
 }
 }
 
+private static Iterable getDocs(DocumentStore store,
+  List paths) {
+return paths.stream()
+.map(p -> store.find(Collection.NODES, Utils.getIdFromPath(p)))
+.filter(Objects::nonNull)
+.collect(Collectors.toList());
+}
+
 public static class Builder {
 
 private final DocumentNodeStore ns;
@@ -267,6 +283,8 @@ public class DocumentStoreCheck {
 
 private boolean consistency;
 
+private final List paths = new ArrayList<>();
+
 public Builder(DocumentNodeStore ns,
DocumentStore store,
Closer closer) {
@@ -340,10 +358,16 @@ public class DocumentStoreCheck {
 return this;
 }
 
+public Builder withPaths(List paths) {
+this.paths.clear();
+this.paths.addAll(paths);
+return this;
+}
+
 public DocumentStoreCh

[jackrabbit-oak] branch trunk updated (8ef02635be -> c803ee28f4)

2023-07-17 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 8ef02635be OAK-10352: Update (shaded) Guava to 32.1.1 (#1028)
 new d25ee850b9 OAK-10340: Child order not updated on source after move
 new 28afb67641 OAK-10340: Child order not updated on source after move
 new f23db0f19e OAK-10340: Child order not updated on source after move
 new 909c336170 Merge branch 'trunk' into OAK-10340
 new c803ee28f4 Merge pull request #1017 from mreutegg/OAK-10340

The 18662 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/jackrabbit/oak/core/MutableTree.java|  9 ++--
 .../org/apache/jackrabbit/oak/core/MoveTest.java   | 53 ++
 2 files changed, 59 insertions(+), 3 deletions(-)



[jackrabbit-oak] branch trunk updated (e50de3a317 -> 56366607a4)

2023-06-29 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from e50de3a317 OAK-10226: fix lucene->elastic conversion for WordDelimiter 
(#1003)
 new e50f432887 OAK-10313: Identify revisions created by late-write scenario
 new 41e78a3a77 OAK-10313: Identify revisions created by late-write scenario
 new e2bbbebf49 Merge branch 'trunk' into OAK-10313
 new c5fe2b73cd OAK-10313: Identify revisions created by late-write scenario
 new 3669b31f39 Merge branch 'trunk' into OAK-10313
 new 56366607a4 Merge pull request #995 from mreutegg/OAK-10313

The 18597 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...rphanedNodeCheck.java => ConsistencyCheck.java} |  80 +--
 .../plugins/document/check/DocumentStoreCheck.java |  18 +-
 .../oak/run/DocumentStoreCheckCommand.java |   9 +
 .../oak/plugins/document/Consistency.java  | 138 
 .../oak/plugins/document/FailingDocumentStore.java |  37 +-
 .../plugins/document/WriteAfterRecoveryTest.java   | 707 +
 6 files changed, 930 insertions(+), 59 deletions(-)
 copy 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/{OrphanedNodeCheck.java
 => ConsistencyCheck.java} (53%)
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Consistency.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/WriteAfterRecoveryTest.java



[jackrabbit-oak] branch trunk updated: OAK-10315: Counter for DocumentStore check

2023-06-27 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 4b1d15e5c5 OAK-10315: Counter for DocumentStore check
 new 41e9d740ce Merge pull request #1008 from mreutegg/OAK-10315-1
4b1d15e5c5 is described below

commit 4b1d15e5c52aa385d5301942cf682e70fd0b6239
Author: Marcel Reutegger 
AuthorDate: Tue Jun 27 10:58:34 2023 +0200

OAK-10315: Counter for DocumentStore check

Disable counter output for test
---
 .../org/apache/jackrabbit/oak/run/DocumentStoreCheckCommandTest.java | 5 +
 1 file changed, 5 insertions(+)

diff --git 
a/oak-run/src/test/java/org/apache/jackrabbit/oak/run/DocumentStoreCheckCommandTest.java
 
b/oak-run/src/test/java/org/apache/jackrabbit/oak/run/DocumentStoreCheckCommandTest.java
index 4d6eae00d5..b041629c82 100644
--- 
a/oak-run/src/test/java/org/apache/jackrabbit/oak/run/DocumentStoreCheckCommandTest.java
+++ 
b/oak-run/src/test/java/org/apache/jackrabbit/oak/run/DocumentStoreCheckCommandTest.java
@@ -88,6 +88,7 @@ public class DocumentStoreCheckCommandTest {
 public void check() throws Exception {
 DocumentStoreCheckCommand cmd = new DocumentStoreCheckCommand();
 cmd.execute(
+"--counter", "false",
 "--out",
 output.getAbsolutePath(),
 MongoUtils.URL
@@ -103,6 +104,7 @@ public class DocumentStoreCheckCommandTest {
 DocumentStoreCheckCommand cmd = new DocumentStoreCheckCommand();
 cmd.execute(
 "--summary", "false",
+"--counter", "false",
 "--out", output.getAbsolutePath(),
 MongoUtils.URL
 );
@@ -117,6 +119,7 @@ public class DocumentStoreCheckCommandTest {
 DocumentStoreCheckCommand cmd = new DocumentStoreCheckCommand();
 cmd.execute(
 "--summary", "false",
+"--counter", "false",
 "--out", output.getAbsolutePath(),
 MongoUtils.URL
 );
@@ -131,6 +134,7 @@ public class DocumentStoreCheckCommandTest {
 DocumentStoreCheckCommand cmd = new DocumentStoreCheckCommand();
 cmd.execute(
 "--summary", "false",
+"--counter", "false",
 "--out", output.getAbsolutePath(),
 MongoUtils.URL
 );
@@ -144,6 +148,7 @@ public class DocumentStoreCheckCommandTest {
 DocumentStoreCheckCommand cmd = new DocumentStoreCheckCommand();
 cmd.execute(
 "--summary", "false",
+"--counter", "false",
 "--out", output.getAbsolutePath(),
 MongoUtils.URL
 );



[jackrabbit-oak] branch trunk updated: OAK-10330: oak-it-osgi: temporarily introduce Guava dependency again

2023-06-27 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 53ee3d9188 OAK-10330: oak-it-osgi: temporarily introduce Guava 
dependency again
 new 4c98e62760 Merge pull request #1009 from mreutegg/OAK-10330
53ee3d9188 is described below

commit 53ee3d9188e1c6e030dbbdcda83ce9fa4ee11a67
Author: Marcel Reutegger 
AuthorDate: Tue Jun 27 11:06:12 2023 +0200

OAK-10330: oak-it-osgi: temporarily introduce Guava dependency again
---
 oak-it-osgi/pom.xml | 5 +
 1 file changed, 5 insertions(+)

diff --git a/oak-it-osgi/pom.xml b/oak-it-osgi/pom.xml
index b01a0f359e..a6a355d80f 100644
--- a/oak-it-osgi/pom.xml
+++ b/oak-it-osgi/pom.xml
@@ -199,6 +199,11 @@
   commons-lang3
   test
 
+
+  com.google.guava
+  guava
+  test
+
 
   commons-fileupload
   commons-fileupload



[jackrabbit-oak] branch trunk updated: OAK-10313: Counter for DocumentStore check

2023-06-26 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 495f96a098 OAK-10313: Counter for DocumentStore check
 new 0b6d60bfc3 Merge pull request #996 from mreutegg/OAK-10315
495f96a098 is described below

commit 495f96a0981248f0da6f7d555bda9c8c9cce8dba
Author: Marcel Reutegger 
AuthorDate: Tue Jun 20 17:16:30 2023 +0200

OAK-10313: Counter for DocumentStore check
---
 .../plugins/document/check/DocumentStoreCheck.java | 16 -
 .../oak/plugins/document/check/NodeCounter.java| 77 ++
 .../oak/run/DocumentStoreCheckCommand.java |  9 +++
 3 files changed, 101 insertions(+), 1 deletion(-)

diff --git 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
index a6cd3dd503..1bde0c8fbe 100644
--- 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
+++ 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
@@ -69,6 +69,8 @@ public class DocumentStoreCheck {
 
 private final boolean summary;
 
+private final boolean counter;
+
 private final int numThreads;
 
 private final ExecutorService executorService;
@@ -93,6 +95,7 @@ public class DocumentStoreCheck {
boolean progress,
boolean silent,
boolean summary,
+   boolean counter,
int numThreads,
String output,
boolean orphan,
@@ -107,6 +110,7 @@ public class DocumentStoreCheck {
 this.progress = progress;
 this.silent = silent;
 this.summary = summary;
+this.counter = counter;
 this.numThreads = numThreads;
 this.executorService = new ThreadPoolExecutor(
 numThreads, numThreads, 1, TimeUnit.MINUTES,
@@ -176,6 +180,9 @@ public class DocumentStoreCheck {
 
 private DocumentProcessor createDocumentProcessor() {
 List processors = new ArrayList<>();
+if (counter) {
+processors.add(new NodeCounter(ns, ns.getHeadRevision(), 
executorService));
+}
 if (summary) {
 processors.add(new Summary(numThreads));
 }
@@ -233,6 +240,8 @@ public class DocumentStoreCheck {
 
 private boolean summary;
 
+private boolean counter;
+
 private int numThreads = Runtime.getRuntime().availableProcessors();
 
 private String output;
@@ -272,6 +281,11 @@ public class DocumentStoreCheck {
 return this;
 }
 
+public Builder withCounter(boolean enable) {
+this.counter = enable;
+return this;
+}
+
 public Builder withNumThreads(int numThreads) {
 this.numThreads = numThreads;
 return this;
@@ -314,7 +328,7 @@ public class DocumentStoreCheck {
 
 public DocumentStoreCheck build() {
 return new DocumentStoreCheck(ns, store, closer, progress, silent,
-summary, numThreads, output, orphan, baseVersion,
+summary, counter, numThreads, output, orphan, baseVersion,
 versionHistory, predecessors, successors, uuid);
 }
 }
diff --git 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/NodeCounter.java
 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/NodeCounter.java
new file mode 100644
index 00..de282e80be
--- /dev/null
+++ 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/NodeCounter.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.document.check;
+
+import java.util.concurrent.BlockingQueue;
+import java.util.concurren

[jackrabbit-oak] branch trunk updated: OAK-5782: Test failure: persistentCache.BroadcastTest.broadcastTCP

2023-06-22 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 60cb9728ba OAK-5782: Test failure: 
persistentCache.BroadcastTest.broadcastTCP
 new 16edc2c0b7 Merge pull request #997 from mreutegg/OAK-5782
60cb9728ba is described below

commit 60cb9728ba53f65a6e46fbd71b3cbd18cc294fc1
Author: Marcel Reutegger 
AuthorDate: Tue Jun 20 17:56:04 2023 +0200

OAK-5782: Test failure: persistentCache.BroadcastTest.broadcastTCP

Ignore test
---
 .../jackrabbit/oak/plugins/document/persistentCache/BroadcastTest.java   | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/BroadcastTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/BroadcastTest.java
index 7d3b3097fd..c1b14d1471 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/BroadcastTest.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/BroadcastTest.java
@@ -143,6 +143,7 @@ public class BroadcastTest {
 }
 
 @Test
+@Ignore("OAK-5782")
 public void broadcastTCP() throws Exception {
 broadcast("tcp:sendTo localhost;key 123", 80);
 }



[jackrabbit-oak] branch trunk updated: OAK-10308: Tests using MongoUtils may skip even if Docker is available

2023-06-19 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 2283639e03 OAK-10308: Tests using MongoUtils may skip even if Docker 
is available
 new 755416d158 Merge pull request #990 from mreutegg/OAK-10308
2283639e03 is described below

commit 2283639e0359a38ffb900150bf7ba93e0b6616d2
Author: Marcel Reutegger 
AuthorDate: Thu Jun 15 17:36:25 2023 +0200

OAK-10308: Tests using MongoUtils may skip even if Docker is available
---
 .../java/org/apache/jackrabbit/oak/plugins/document/MongoUtils.java  | 5 -
 .../jackrabbit/oak/plugins/document/mongo/MongoDockerRule.java   | 4 
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoUtils.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoUtils.java
index 3178590eab..0e44843ec4 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoUtils.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoUtils.java
@@ -19,6 +19,7 @@ package org.apache.jackrabbit.oak.plugins.document;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.jackrabbit.oak.plugins.document.mongo.MongoDockerRule;
 import org.apache.jackrabbit.oak.plugins.document.util.MongoConnection;
@@ -70,15 +71,17 @@ public class MongoUtils {
 // fallback to docker based MongoDB if available
 MongoDockerRule dockerRule = new MongoDockerRule();
 if (MongoDockerRule.isDockerAvailable()) {
+AtomicReference host = new AtomicReference<>();
 AtomicInteger port = new AtomicInteger();
 try {
 dockerRule.apply(new Statement() {
 @Override
 public void evaluate() {
+host.set(dockerRule.getHost());
 port.set(dockerRule.getPort());
 }
 }, Description.EMPTY).evaluate();
-mongoUrl = "mongodb://localhost:" + port.get() + "/" + DB + 
"?" + OPTIONS;
+mongoUrl = "mongodb://" + host + ":" + port.get() + "/" + DB + 
"?" + OPTIONS;
 } catch (Throwable t) {
 LOG.warn("Unable to get MongoDB port from Docker", t);
 }
diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDockerRule.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDockerRule.java
index b983e4e910..114755ccb6 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDockerRule.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDockerRule.java
@@ -103,6 +103,10 @@ public class MongoDockerRule implements TestRule {
 return 
wrappedRule.getContainer().getPortBinding("27017/tcp").getPort();
 }
 
+public String getHost() {
+return 
wrappedRule.getContainer().getPortBinding("27017/tcp").getHost();
+}
+
 public static boolean isDockerAvailable() {
 return DOCKER_AVAILABLE;
 }



[jackrabbit-oak] branch trunk updated: OAK-10306: Incorrect dependency scope for commons-math3

2023-06-15 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new afddcd7251 OAK-10306: Incorrect dependency scope for commons-math3
 new f3f8059087 Merge pull request #985 from mreutegg/OAK-10306
afddcd7251 is described below

commit afddcd72514fdca2a5530c67fd7f69bb9505289f
Author: Marcel Reutegger 
AuthorDate: Thu Jun 15 14:15:03 2023 +0200

OAK-10306: Incorrect dependency scope for commons-math3
---
 oak-commons/pom.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/oak-commons/pom.xml b/oak-commons/pom.xml
index a41f22c216..622a39d610 100644
--- a/oak-commons/pom.xml
+++ b/oak-commons/pom.xml
@@ -117,12 +117,11 @@
 
   org.apache.commons
   commons-math3
-  true
+  test
 
 
   org.apache.commons
   commons-lang3
-  true
   test
 
 



[jackrabbit-oak] branch trunk updated: OAK-9660: NullPointerException When Moving Transient node

2023-06-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 9186a659c3 OAK-9660: NullPointerException When Moving Transient node
 new 22e72d6b5a Merge pull request #975 from mreutegg/OAK-9660-1
9186a659c3 is described below

commit 9186a659c34fe8e9020d3c0ed34544b1e1b1b6d0
Author: Marcel Reutegger 
AuthorDate: Fri Jun 9 11:01:47 2023 +0200

OAK-9660: NullPointerException When Moving Transient node

Enable test and add some additional assertion
Implement fix
---
 .../test/java/org/apache/jackrabbit/oak/jcr/TransientMoveTest.java | 7 ---
 .../apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java| 7 +--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git 
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TransientMoveTest.java 
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TransientMoveTest.java
index 56b2cb001d..56f301a951 100644
--- a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TransientMoveTest.java
+++ b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TransientMoveTest.java
@@ -26,12 +26,12 @@ import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.commons.JcrUtils;
 import org.apache.jackrabbit.oak.NodeStoreFixtures;
 import org.apache.jackrabbit.oak.fixture.NodeStoreFixture;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runners.Parameterized;
 
 import static java.util.Collections.singleton;
 import static 
org.apache.jackrabbit.oak.commons.FixturesHelper.Fixture.MEMORY_NS;
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 public class TransientMoveTest extends AbstractRepositoryTest {
@@ -45,7 +45,6 @@ public class TransientMoveTest extends AbstractRepositoryTest 
{
 return NodeStoreFixtures.asJunitParameters(singleton(MEMORY_NS));
 }
 
-@Ignore("OAK-9660")
 @Test
 public void transientMove() throws Exception {
 // setup
@@ -91,7 +90,7 @@ public class TransientMoveTest extends AbstractRepositoryTest 
{
 // What we really want to do is copy the child, but creating a new 
node with the same name is sufficient.
 // In the real world, this would have content on it, so all the 
properties and children would be copied - for testing it doesn't matter.
 // JcrUtil.copy(child, parent, "child", false);
-parent.addNode(child.getName(), 
child.getPrimaryNodeType().getName());
+Node c = parent.addNode(child.getName(), 
child.getPrimaryNodeType().getName());
 
 assertTrue(session.hasPendingChanges()); // None of these changes 
have been persisted yet. This is to verify that no auto-saves have occurred.
 
@@ -99,6 +98,8 @@ public class TransientMoveTest extends AbstractRepositoryTest 
{
 session.move("/var/oak-bug/test/parent/child", 
"/var/oak-bug/test/parent/tmp-4321"); // NPE On this Call.
 
 session.save();
+
+assertEquals("/var/oak-bug/test/parent/tmp-4321", c.getPath());
 } finally {
 session.logout();
 }
diff --git 
a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
 
b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
index eb7ab76534..07fb32fdf8 100644
--- 
a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
+++ 
b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
@@ -443,10 +443,13 @@ public class MemoryNodeBuilder implements NodeBuilder {
 PropertyState head = 
builder.getNodeState().getProperty(MoveDetector.SOURCE_PATH);
 if (Objects.equal(base, head)) {
 // Both null: no source path annotation
-// Both non null but equals: source path annotation is from a 
previous commit
+// Both non-null but equals: source path annotation is from a 
previous commit
 return null;
 } else {
-return head.getValue(Type.STRING);
+// OAK-9660: base may have a source path and head does not.
+// happens when this node had a source path and was transiently
+// removed and added again (without source path).
+return head != null ? head.getValue(Type.STRING) : null;
 }
 }
 



[jackrabbit-oak] branch trunk updated (7bcb56a077 -> a520e5de6f)

2023-06-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 7bcb56a077 OAK-10291: oak-segment-remote: PersistentRedisCacheTest may 
fail on Windows due to insufficient pagefile size. (#977)
 new bc5150dfc8 OAK-10147: Many move operations may consume a lot of memory
 new 2a42d09b01 OAK-10147: Many move operations may consume a lot of memory
 new 32620faa29 OAK-10147: Many move operations may consume a lot of memory
 new d4df2711e0 OAK-10147: Many move operations may consume a lot of memory
 new e1f98641b7 OAK-10147: Many move operations may consume a lot of memory
 new 50586200f7 OAK-10147: Many move operations may consume a lot of memory
 new a520e5de6f Merge pull request #962 from mreutegg/OAK-10147-4

The 18543 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...ringWriteTest.java => AccessAfterMoveTest.java} |  41 ++--
 .../jackrabbit/oak/benchmark/BenchmarkRunner.java  |   3 +-
 .../main/java/org/apache/jackrabbit/oak/Oak.java   |   6 +-
 .../jackrabbit/oak/core/ContentRepositoryImpl.java |  11 +-
 .../jackrabbit/oak/core/ContentSessionImpl.java|   9 +-
 .../apache/jackrabbit/oak/core/MutableRoot.java| 125 ++--
 .../org/apache/jackrabbit/oak/core/SystemRoot.java |   4 +-
 .../org/apache/jackrabbit/oak/core/MoveTest.java   | 218 +
 .../jackrabbit/oak/core/MutableRootTest.java   |   3 +-
 .../org/apache/jackrabbit/oak/core/RootTest.java   |  16 ++
 10 files changed, 358 insertions(+), 78 deletions(-)
 copy 
oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/{StringWriteTest.java
 => AccessAfterMoveTest.java} (57%)
 copy oak-it/src/test/java/org/apache/jackrabbit/oak/core/RootTest.java => 
oak-core/src/test/java/org/apache/jackrabbit/oak/core/MoveTest.java (64%)



[jackrabbit-oak] branch trunk updated (136bf146f5 -> de3c2755f9)

2023-06-09 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 136bf146f5 OAK-10287: switch oak-benchmarks-lucene to shaded guava 
(#973)
 new 5ae2e6c5d2 OAK-10280: Occasional failure to start docker container
 new 3a9d407841 OAK-10280: Occasional failure to start docker container
 new f49e2caccb OAK-10280: Occasional failure to start docker container
 new de3c2755f9 Merge pull request #969 from mreutegg/OAK-10280

The 18532 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../cloud/azure/blobstorage/AzuriteDockerRule.java |  29 +-
 .../jackrabbit/oak/run/AzuriteDockerRule.java  | 106 -
 .../oak/run/DataStoreCopyCommandTest.java  |   1 +
 oak-segment-azure/pom.xml  |   7 ++
 .../segment/azure/tool/SegmentCopyTestBase.java|   3 +-
 .../oak/segment/azure/AzureArchiveManagerTest.java |   1 +
 .../oak/segment/azure/AzureGCJournalTest.java  |   2 +
 .../oak/segment/azure/AzureJournalFileTest.java|   1 +
 .../oak/segment/azure/AzureManifestFileTest.java   |   2 +
 .../oak/segment/azure/AzureReadSegmentTest.java|   1 +
 .../oak/segment/azure/AzureRepositoryLockTest.java |   2 +
 .../azure/AzureSegmentStoreServiceTest.java|   2 +
 .../oak/segment/azure/AzureTarFileTest.java|   2 +
 .../oak/segment/azure/AzureTarFilesTest.java   |   2 +
 .../oak/segment/azure/AzureTarWriterTest.java  |   2 +
 .../oak/segment/azure/AzuriteDockerRule.java   | 106 -
 .../azure/journal/AzureJournalReaderTest.java  |   3 +-
 .../azure/journal/AzureTarRevisionsTest.java   |   3 +-
 .../azure/journal/ReverseFileReaderTest.java   |   3 +-
 .../oak/segment/azure/tool/ToolUtilsTest.java  |   3 +-
 .../split/SplitPersistenceBlobTest.java|   2 +-
 .../persistence/split/SplitPersistenceTest.java|   2 +-
 .../plugins/document/mongo/MongoDockerRule.java|  41 +++-
 oak-upgrade/pom.xml|   2 +-
 .../upgrade/cli/SegmentAzureToSegmentTarTest.java  |   2 +-
 .../upgrade/cli/SegmentTarToSegmentAzureTest.java  |   2 +-
 .../container/SegmentAzureNodeStoreContainer.java  |   2 +-
 27 files changed, 101 insertions(+), 233 deletions(-)
 delete mode 100644 
oak-run/src/test/java/org/apache/jackrabbit/oak/run/AzuriteDockerRule.java
 delete mode 100644 
oak-segment-azure/src/test/java/org/apache/jackrabbit/oak/segment/azure/AzuriteDockerRule.java



[jackrabbit-oak] branch trunk updated: OAK-9660: NullPointerException When Moving Transient node

2023-06-09 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 9f3358d11a OAK-9660: NullPointerException When Moving Transient node
 new 488cca50af Merge pull request #461 from mreutegg/OAK-9660
9f3358d11a is described below

commit 9f3358d11ad7fc9585266d9003638cad5637f8fd
Author: Marcel Reutegger 
AuthorDate: Thu Jan 13 15:48:20 2022 +0100

OAK-9660: NullPointerException When Moving Transient node

Test by Bryan Stopp
---
 .../jackrabbit/oak/jcr/TransientMoveTest.java  | 110 +
 1 file changed, 110 insertions(+)

diff --git 
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TransientMoveTest.java 
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TransientMoveTest.java
new file mode 100644
index 00..56b2cb001d
--- /dev/null
+++ b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TransientMoveTest.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.jcr;
+
+import java.util.Collection;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.jackrabbit.JcrConstants;
+import org.apache.jackrabbit.commons.JcrUtils;
+import org.apache.jackrabbit.oak.NodeStoreFixtures;
+import org.apache.jackrabbit.oak.fixture.NodeStoreFixture;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runners.Parameterized;
+
+import static java.util.Collections.singleton;
+import static 
org.apache.jackrabbit.oak.commons.FixturesHelper.Fixture.MEMORY_NS;
+import static org.junit.Assert.assertTrue;
+
+public class TransientMoveTest extends AbstractRepositoryTest {
+
+public TransientMoveTest(NodeStoreFixture fixture) {
+super(fixture);
+}
+
+@Parameterized.Parameters(name="{0}")
+public static Collection memoryFixture() {
+return NodeStoreFixtures.asJunitParameters(singleton(MEMORY_NS));
+}
+
+@Ignore("OAK-9660")
+@Test
+public void transientMove() throws Exception {
+// setup
+Session session = login();
+try {
+// Create the node tree we'll be updating/moving
+JcrUtils.getOrCreateByPath("/var/oak-bug/parent/child",
+JcrConstants.NT_UNSTRUCTURED, JcrConstants.NT_UNSTRUCTURED,
+session, false);
+session.save();
+} finally {
+session.logout();
+}
+
+// move parent
+session = login();
+try {
+// Create the new node to move the parent tree onto
+JcrUtils.getOrCreateByPath("/var/oak-bug/test",
+JcrConstants.NT_UNSTRUCTURED, JcrConstants.NT_UNSTRUCTURED,
+session, false);
+// Move the parent tree - this operation in this session, i 
believe, eventually causes the error later.
+session.move("/var/oak-bug/parent", "/var/oak-bug/test/parent");
+session.save();
+} finally {
+session.logout();
+}
+
+// generate NPE
+session = login();
+try {
+// We rename the parent to a new node, as we're going to replace 
it with new content that needs to be under the original name.
+session.move("/var/oak-bug/test/parent", 
"/var/oak-bug/test/tmp-1234");
+
+// Create the new node using the original name "parent"
+Node parent = 
JcrUtils.getOrCreateByPath("/var/oak-bug/test/parent",
+JcrConstants.NT_UNSTRUCTURED, JcrConstants.NT_UNSTRUCTURED,
+session, false);
+
+// We need to preserve the original parent's children, so grab the 
child from the previous parent that was renamed,
+Node child = session.getNode("/var/oak-bug/test/tmp-1234/child");
+
+// What we really want to do is copy the child, but creating a new 
node with the sa

[jackrabbit-oak] branch trunk updated (bdac0103c4 -> e8c9e9cad7)

2023-05-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from bdac0103c4 Merge pull request #955 from apache/OAK-10262
 new 8adf8dbe45 OAK-10259: oak-core tests running out of memory
 new ef5f4efaea OAK-10259: oak-core tests running out of memory
 new e8c9e9cad7 Merge pull request #953 from mreutegg/OAK-10259

The 18504 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/jackrabbit/oak/AbstractSecurityTest.java  |  2 ++
 .../authentication/LoginContextProviderImplTest.java | 16 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)



[jackrabbit-oak] branch trunk updated (f31c995cf1 -> eb5654e53f)

2023-05-24 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from f31c995cf1 Merge pull request #951 from mreutegg/OAK-10257
 new 8ddae702dc OAK-10250: Configurable suspend timeout
 new dd3e641ac1 OAK-10250: Configurable suspend timeout
 new eb5654e53f Merge pull request #946 from mreutegg/OAK-10250

The 18493 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../oak/plugins/document/CommitQueue.java  | 24 +++---
 .../oak/plugins/document/Configuration.java|  8 
 .../oak/plugins/document/DocumentNodeStore.java|  1 +
 .../plugins/document/DocumentNodeStoreBuilder.java | 11 ++
 .../plugins/document/DocumentNodeStoreService.java |  1 +
 .../DocumentNodeStoreServiceConfigurationTest.java |  1 +
 .../document/DocumentNodeStoreServiceTest.java | 12 +++
 7 files changed, 55 insertions(+), 3 deletions(-)



[jackrabbit-oak] branch trunk updated: OAK-10257: NodeCounterMetricTest does not release resources

2023-05-24 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new e5c62d03d0 OAK-10257: NodeCounterMetricTest does not release resources
 new f31c995cf1 Merge pull request #951 from mreutegg/OAK-10257
e5c62d03d0 is described below

commit e5c62d03d00678b48a22d12764e2ae3d938af3c2
Author: Marcel Reutegger 
AuthorDate: Tue May 23 16:11:46 2023 +0200

OAK-10257: NodeCounterMetricTest does not release resources
---
 .../index/counter/NodeCounterMetricTest.java   | 32 +-
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git 
a/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/counter/NodeCounterMetricTest.java
 
b/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/counter/NodeCounterMetricTest.java
index fd1d56ef9e..1baf251cc7 100644
--- 
a/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/counter/NodeCounterMetricTest.java
+++ 
b/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/counter/NodeCounterMetricTest.java
@@ -18,6 +18,7 @@ package org.apache.jackrabbit.oak.plugins.index.counter;
 
 import org.apache.jackrabbit.oak.InitialContent;
 import org.apache.jackrabbit.oak.Oak;
+import org.apache.jackrabbit.oak.api.ContentRepository;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.Root;
@@ -46,6 +47,8 @@ import javax.management.InstanceNotFoundException;
 import javax.management.AttributeNotFoundException;
 import javax.management.MBeanException;
 import javax.security.auth.login.LoginException;
+
+import java.io.Closeable;
 import java.io.IOException;
 import java.lang.management.ManagementFactory;
 import java.util.concurrent.Executors;
@@ -63,16 +66,29 @@ public class NodeCounterMetricTest {
 private MetricStatisticsProvider statsProvider;
 private static final String mBeanName = 
"org.apache.jackrabbit.oak:name=NODE_COUNT_FROM_ROOT,type=Metrics";
 private ObjectName mBeanObjectName;
+private NodeStore nodeStore;
+private Whiteboard wb;
+private ContentRepository repository;
+private ContentSession session;
 
 @Before
 public void before() throws NoSuchWorkspaceException, LoginException, 
MalformedObjectNameException {
 executor = Executors.newSingleThreadScheduledExecutor();
 statsProvider = new 
MetricStatisticsProvider(ManagementFactory.getPlatformMBeanServer(), executor);
 mBeanObjectName = new ObjectName(mBeanName);
+nodeStore = new MemoryNodeStore();
+Oak oak = getOak(nodeStore);
+wb = oak.getWhiteboard();
+repository = oak.createContentRepository();
+session = repository.login(null, null);
 }
 
 @After
-public void after() {
+public void after() throws Exception {
+session.close();
+if (repository instanceof Closeable) {
+((Closeable) repository).close();
+}
 // we have to deregister the statistics provider after each test case, 
as the call to
 // ManagementFactory.getPlatformMBeanServer() would otherwise return 
the mBean server with the statistics
 // provider from the first test case and reuse it.
@@ -82,13 +98,8 @@ public class NodeCounterMetricTest {
 
 @Test
 public void testMetricWhenAddingNodes() throws CommitFailedException, 
IOException, ReflectionException,
-InstanceNotFoundException, AttributeNotFoundException, 
MBeanException, NoSuchWorkspaceException,
-LoginException {
-NodeStore nodeStore = new MemoryNodeStore();
-Oak oak = getOak(nodeStore);
-ContentSession session = oak.createContentRepository().login(null, 
null);
+InstanceNotFoundException, AttributeNotFoundException, 
MBeanException {
 Root root = session.getLatestRoot();
-Whiteboard wb = oak.getWhiteboard();
 setCounterIndexSeed(root, 2);
 root.commit();
 
@@ -101,13 +112,8 @@ public class NodeCounterMetricTest {
 
 @Test
 public void testMetricWhenDeletingNodes() throws CommitFailedException, 
ReflectionException,
-AttributeNotFoundException, InstanceNotFoundException, 
MBeanException, IOException,
-NoSuchWorkspaceException, LoginException {
-NodeStore nodeStore = new MemoryNodeStore();
-Oak oak = getOak(nodeStore);
-ContentSession session = oak.createContentRepository().login(null, 
null);
+AttributeNotFoundException, InstanceNotFoundException, 
MBeanException, IOException {
 Root root = session.getLatestRoot();
-Whiteboard wb = oak.getWhiteboard();
 setCounterIndexSeed(root, 1);
 
 MBeanServerConnection server = 
ManagementFactory.getPlatformMBeanServer();



[jackrabbit-oak] branch trunk updated: OAK-9757: Getting Node name is too long Exception (150 bytes) while saving node in mongo db

2023-05-16 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 21da930d4e OAK-9757: Getting Node name is too long Exception (150 
bytes) while saving node in mongo db
 new d2a649a169 Merge pull request #943 from mreutegg/OAK-9757-doc
21da930d4e is described below

commit 21da930d4e775e349a9b0554a106f7fef256b1f5
Author: Marcel Reutegger 
AuthorDate: Tue May 16 13:37:48 2023 +0200

OAK-9757: Getting Node name is too long Exception (150 bytes) while saving 
node in mongo db

Update documentation
---
 oak-doc/src/site/markdown/constraints.md | 5 ++---
 oak-doc/src/site/markdown/differences.md | 9 ++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/oak-doc/src/site/markdown/constraints.md 
b/oak-doc/src/site/markdown/constraints.md
index 8ba9477b80..328d9d4ce9 100755
--- a/oak-doc/src/site/markdown/constraints.md
+++ b/oak-doc/src/site/markdown/constraints.md
@@ -37,9 +37,8 @@ On top of that, Oak implements several *additional* 
restrictions (as per
 a (local) name (see [JCR v2.0 Specification, Section 
5.2.2.1](https://s.apache.org/jcr-2.0-spec/5_Reading.html#5.2.2.1%20Name%20Patterns)
 for motivation).
 - Other ASCII whitespace characters (CR, LF, TAB) are always disallowed 
(before OAK 1.10, more were disallowed, see 
[OAK-4857](https://issues.apache.org/jira/browse/OAK-4857)).
 
-Finally, the chosen persistence implementation might restrict node names even 
further, for instance:
-
-- in the "Document NodeStore", the UTF-8 representation of local names can not 
exceed ~150 bytes.
+Finally, the chosen persistence implementation might restrict node names even 
further.
+See [Node Name Length Limit](./differences.md#node-name-length-limit).
 
 The namespace for prefix `rep` (`internal`) is not a valid URI therefore you 
can only use the qualified names but not the expanded names ([JCR v2.0 
Specification, Section 
3.2.5](https://s.apache.org/jcr-2.0-spec/3_Repository_Model.html#3.2.5%20Lexical%20Form%20of%20JCR%20Names))
 when addressing items in that 
namespace([OAK-74](https://issues.apache.org/jira/browse/OAK-74)).
 
diff --git a/oak-doc/src/site/markdown/differences.md 
b/oak-doc/src/site/markdown/differences.md
index 5b6c22127b..62b77e7dd7 100644
--- a/oak-doc/src/site/markdown/differences.md
+++ b/oak-doc/src/site/markdown/differences.md
@@ -44,9 +44,12 @@ The limitations are described in 
[Constraints](./constraints.html).
 
  Node Name Length Limit
 
-With the document storage backend (MongoDB, RDBMS), there is currently 
-a limit of 150 UTF-8 bytes on the length of the node names.
-See also [OAK-2644](https://issues.apache.org/jira/browse/OAK-2644).
+With the document storage backend there was a limit of 150 UTF-8 bytes on the
+length of the node names with MongoDB 4.0 and earlier. Starting with Oak 1.44
+and MongoDB 4.2, this limitation has been removed. The limit still exists when
+running Oak on a document storage backend using RDBMS.
+See also [OAK-2644](https://issues.apache.org/jira/browse/OAK-2644) and
+[OAK-9757](https://issues.apache.org/jira/browse/OAK-9757).
 
 ### Session state and refresh behaviour
 



[jackrabbit-oak] branch trunk updated (45d41e4a43 -> 4bcd05b0cc)

2023-05-15 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 45d41e4a43 Merge pull request #939 from mreutegg/OAK-10241
 new 2bc4d4d79a OAK-10243: Flaky test in oak-blob-cloud-azure and oak-run
 new e80924f7e5 OAK-10243: Flaky test in oak-blob-cloud-azure and oak-run
 new 4bcd05b0cc Merge pull request #941 from mreutegg/OAK-10243

The 18472 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../oak/blob/cloud/azure/blobstorage/AzuriteDockerRule.java | 6 +-
 .../test/java/org/apache/jackrabbit/oak/run/AzuriteDockerRule.java  | 5 -
 2 files changed, 9 insertions(+), 2 deletions(-)



[jackrabbit-oak] branch trunk updated: OAK-10241: NPE while trying to get the BinaryDownload URI

2023-05-15 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 2ca949bdf4 OAK-10241: NPE while trying to get the BinaryDownload URI
 new 45d41e4a43 Merge pull request #939 from mreutegg/OAK-10241
2ca949bdf4 is described below

commit 2ca949bdf408744d72ef6436e1d33adcf0523dea
Author: Marcel Reutegger 
AuthorDate: Mon May 15 11:55:30 2023 +0200

OAK-10241: NPE while trying to get the BinaryDownload URI

Add test and implement fix
---
 .../oak/plugins/value/jcr/BinaryImpl.java  | 10 +++---
 .../oak/plugins/value/jcr/BinaryImplTest.java  | 38 ++
 2 files changed, 44 insertions(+), 4 deletions(-)

diff --git 
a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImpl.java
 
b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImpl.java
index 99d4e7238e..ac36f7f6a6 100644
--- 
a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImpl.java
+++ 
b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImpl.java
@@ -93,18 +93,20 @@ class BinaryImpl implements ReferenceBinary, BinaryDownload 
{
 @Override
 public URI getURI(@NotNull BinaryDownloadOptions downloadOptions)
 throws RepositoryException {
-if (value.getBlob().isInlined()) {
-// Binary is inlined, we cannot return a URI for it
+ValueImpl v = getBinaryValue();
+if (v == null || v.getBlob().isInlined()) {
+// property is not a binary, or it is inlined
+// we cannot return a URI for it
 return null;
 }
 
 // ValueFactoryImpl.getBlobId() will only return a blobId for a 
BinaryImpl, which
 // a client cannot spoof, so we know that the id in question is valid 
and can be
 // trusted, so we can safely give out a URI to the binary for 
downloading.
-Blob blob = getBinaryValue().getBlob();
+Blob blob = v.getBlob();
 String blobId = blob.getContentIdentity();
 if (null != blobId) {
-return value.getDownloadURI(blob, downloadOptions);
+return v.getDownloadURI(blob, downloadOptions);
 }
 return null;
 }
diff --git 
a/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImplTest.java
 
b/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImplTest.java
new file mode 100644
index 00..7b628b8443
--- /dev/null
+++ 
b/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImplTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.value.jcr;
+
+import org.apache.jackrabbit.api.binary.BinaryDownloadOptions;
+import org.apache.jackrabbit.oak.api.PropertyState;
+import org.apache.jackrabbit.oak.namepath.NamePathMapper;
+import org.apache.jackrabbit.oak.plugins.memory.StringPropertyState;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNull;
+
+public class BinaryImplTest {
+
+@Test // OAK-10241
+public void getURIFromNonBinaryType() throws Exception {
+NamePathMapper mapper = new NamePathMapper.Default();
+PartialValueFactory vf = new PartialValueFactory(mapper);
+PropertyState p = new StringPropertyState("name", "value");
+ValueImpl value = new ValueImpl(p, mapper, vf.getBlobAccessProvider());
+BinaryImpl binary = new BinaryImpl(value);
+assertNull(binary.getURI(BinaryDownloadOptions.DEFAULT));
+}
+}



[jackrabbit-oak] branch trunk updated: OAK-10235: Release Oak 1.52.0

2023-05-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 3fc39eaee9 OAK-10235: Release Oak 1.52.0
3fc39eaee9 is described below

commit 3fc39eaee9bf319b4f1d51d21c2074605886b6d2
Author: Marcel Reutegger 
AuthorDate: Fri May 12 13:34:21 2023 +0200

OAK-10235: Release Oak 1.52.0

Align versions after release
---
 oak-doc-railroad-macro/pom.xml | 2 +-
 oak-doc/pom.xml| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/oak-doc-railroad-macro/pom.xml b/oak-doc-railroad-macro/pom.xml
index 511fb65831..0aa0f804f8 100644
--- a/oak-doc-railroad-macro/pom.xml
+++ b/oak-doc-railroad-macro/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.jackrabbit
 oak-parent
-1.51-SNAPSHOT
+1.53-SNAPSHOT
 ../oak-parent/pom.xml
 
 
diff --git a/oak-doc/pom.xml b/oak-doc/pom.xml
index fb881e7ea2..7d65b70335 100644
--- a/oak-doc/pom.xml
+++ b/oak-doc/pom.xml
@@ -23,7 +23,7 @@
   
 org.apache.jackrabbit
 oak-parent
-1.51-SNAPSHOT
+1.53-SNAPSHOT
 ../oak-parent/pom.xml
   
 



[jackrabbit-oak] branch trunk updated (8dbe0e5da7 -> 3b5fac424c)

2023-05-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 8dbe0e5da7 enable autolinks for JIRA projects
 new 2fbd4f89bb OAK-10147: Many move operations may consume a lot of memory
 new 3a50913052 OAK-10147: Many move operations may consume a lot of memory
 new 3b5fac424c Merge pull request #935 from mreutegg/OAK-10147

The 18462 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 oak-doc/src/site/markdown/architecture/move.md | 117 ++
 .../architecture/tree-access-after-move.png| Bin 0 -> 19675 bytes
 .../architecture/tree-access-after-move.uxf| 212 ++
 .../architecture/tree-after-many-moves.png | Bin 0 -> 55518 bytes
 .../architecture/tree-after-many-moves.uxf | 443 +
 .../site/markdown/architecture/tree-after-move.png | Bin 0 -> 18565 bytes
 .../site/markdown/architecture/tree-after-move.uxf | 210 ++
 .../markdown/architecture/tree-before-move.png | Bin 0 -> 14516 bytes
 .../markdown/architecture/tree-before-move.uxf | 183 +
 9 files changed, 1165 insertions(+)
 create mode 100644 oak-doc/src/site/markdown/architecture/move.md
 create mode 100644 
oak-doc/src/site/markdown/architecture/tree-access-after-move.png
 create mode 100644 
oak-doc/src/site/markdown/architecture/tree-access-after-move.uxf
 create mode 100644 
oak-doc/src/site/markdown/architecture/tree-after-many-moves.png
 create mode 100644 
oak-doc/src/site/markdown/architecture/tree-after-many-moves.uxf
 create mode 100644 oak-doc/src/site/markdown/architecture/tree-after-move.png
 create mode 100644 oak-doc/src/site/markdown/architecture/tree-after-move.uxf
 create mode 100644 oak-doc/src/site/markdown/architecture/tree-before-move.png
 create mode 100644 oak-doc/src/site/markdown/architecture/tree-before-move.uxf



[jackrabbit-oak] branch trunk updated: OAK-10163 : add benchmark test cases to measure performance using query with projection

2023-03-30 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 1c28101ce6 OAK-10163 : add benchmark test cases to measure performance 
using query with projection
 new ba82ae23b3 Merge pull request #882 from rishabhdaim/OAK-10163
1c28101ce6 is described below

commit 1c28101ce630146fe47c7755eb3b7f7b9af25473
Author: Rishabh Kumar 
AuthorDate: Wed Mar 29 20:31:04 2023 +0530

OAK-10163 : add benchmark test cases to measure performance using query 
with projection
---
 .../jackrabbit/oak/benchmark/BenchmarkRunner.java  |   1 +
 .../oak/benchmark/CompareManyChildNodesTest.java   | 118 +
 2 files changed, 119 insertions(+)

diff --git 
a/oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/BenchmarkRunner.java
 
b/oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/BenchmarkRunner.java
index 22392fc5d7..ac4d571c74 100644
--- 
a/oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/BenchmarkRunner.java
+++ 
b/oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/BenchmarkRunner.java
@@ -206,6 +206,7 @@ public class BenchmarkRunner {
 new SQL2DescendantSearchTest(),
 new FlatTreeUpdateTest(),
 new CreateManyChildNodesTest(),
+new CompareManyChildNodesTest(),
 new CreateManyNodesTest(),
 new UpdateManyChildNodesTest(),
 new TransientManyChildNodesTest(),
diff --git 
a/oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/CompareManyChildNodesTest.java
 
b/oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/CompareManyChildNodesTest.java
new file mode 100644
index 00..96c3237f4b
--- /dev/null
+++ 
b/oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/CompareManyChildNodesTest.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.benchmark;
+
+import org.apache.jackrabbit.oak.fixture.OakFixture;
+import org.apache.jackrabbit.oak.fixture.OakRepositoryFixture;
+import org.apache.jackrabbit.oak.fixture.RepositoryFixture;
+import org.apache.jackrabbit.oak.json.JsopDiff;
+import org.apache.jackrabbit.oak.plugins.document.DocumentNodeState;
+import org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+import static org.apache.commons.lang3.reflect.FieldUtils.readField;
+import static org.apache.commons.lang3.reflect.FieldUtils.writeField;
+import static org.apache.commons.lang3.reflect.MethodUtils.invokeMethod;
+
+/**
+ * Test for measuring the performance of comparing node with many children and
+ * each child having multiple properties.
+ */
+public class CompareManyChildNodesTest extends AbstractTest {
+
+private static final String ROOT_NODE_NAME = "compare" + TEST_ID;
+
+private static final int CHILD_COUNT = 10_000;
+
+private Session session;
+
+private DocumentNodeStore store;
+private DocumentNodeState before;
+private DocumentNodeState after;
+
+@Override
+public void beforeSuite() throws Exception {
+session = getRepository().login(getCredentials());
+final Node node = session.getRootNode().addNode(ROOT_NODE_NAME, 
"nt:unstructured");
+for (int i = 0; i < CHILD_COUNT; i++) {
+node.addNode("node" + i, "nt:unstructured");
+if (i % 1000 == 0) {
+session.save();
+}
+}
+
+session.save();
+store = getDocumentStore();
+writeField(store, "disableJournalDiff", true, true);
+before = store.getRoot();
+
+for (int i = 0; i < CHILD_COUNT; i++) {
+node.addNode("one_more" + i, "nt:unstructured");
+Node n = node.getNode("node" + i

[jackrabbit-oak] branch trunk updated (1446e1b098 -> 5359461ad8)

2023-03-28 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 1446e1b098 OAK-10050 - Enable access to the secondary Azure blobstore 
service endpoint in Oak segment node store (#820)
 new d928ed2f07 OAK-10149: Rebase may be expensive with many siblings
 new 30be1c32a1 OAK-10149: Rebase may be expensive with many siblings
 new a68c954353 OAK-10149: Rebase may be expensive with many siblings
 new 5359461ad8 Merge pull request #874 from mreutegg/OAK-10149

The 18363 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../document/AbstractDocumentNodeState.java|  8 +++
 ...CountingDiff.java => ReverseNodeStateDiff.java} | 51 ++
 .../plugins/document/DocumentNodeStateTest.java| 41 
 .../oak/plugins/document/RebaseTest.java   | 77 ++
 .../document/util/ReverseNodeStateDiffTest.java| 67 +++
 5 files changed, 212 insertions(+), 32 deletions(-)
 copy 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/{CountingDiff.java
 => ReverseNodeStateDiff.java} (53%)
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RebaseTest.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/util/ReverseNodeStateDiffTest.java



[jackrabbit-oak] branch trunk updated (b38b91321b -> ee3fb35441)

2023-03-16 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from b38b91321b [maven-release-plugin] rollback the release of 
jackrabbit-oak-1.50.0
 new f91fc63ac7 OAK-10114 : created new query API with projections to limit 
memory usage when fetching huge no. of records
 new 5ae1d505af OAK-10114 : make query with projection return only _id as 
mandatory & skip adding docs to cache if projection is used
 new d9c7f14f05 OAK-10114 : fixed the caching issue by avoiding making the 
unsealed documents
 new 20e4c3b648 OAK-10114: Node diff with many changes uses excessive memory
 new 2296d43741 Merge pull request #2 from mreutegg/OAK-10114-1
 new ee3fb35441 Merge pull request #858 from rishabhdaim/OAK-10114

The 18340 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../oak/plugins/document/DocumentNodeStore.java|  4 +-
 .../oak/plugins/document/DocumentStore.java| 54 ++
 .../plugins/document/mongo/MongoDocumentStore.java | 28 --
 .../util/LeaseCheckDocumentStoreWrapper.java   |  8 +++
 .../document/util/LoggingDocumentStoreWrapper.java | 14 +
 .../util/SynchronizingDocumentStoreWrapper.java|  9 +++
 .../util/ThrottlingDocumentStoreWrapper.java   |  8 +++
 .../document/util/TimingDocumentStoreWrapper.java  | 18 ++
 .../oak/plugins/document/MongoDocumentStoreIT.java | 64 ++
 .../oak/plugins/document/mongo/RetryReadIT.java|  3 +-
 10 files changed, 204 insertions(+), 6 deletions(-)



[jackrabbit-oak] branch trunk updated: OAK-10134: Update Oak GitHub actions (#867)

2023-03-09 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new b0c2f2ef11 OAK-10134: Update Oak GitHub actions (#867)
b0c2f2ef11 is described below

commit b0c2f2ef116c7273e1646e3b0f95b014fa48c9e6
Author: Marcel Reutegger 
AuthorDate: Thu Mar 9 09:06:52 2023 +0100

OAK-10134: Update Oak GitHub actions (#867)

OAK-10134: Update Oak GitHub actions

Use most recent version of actions in use
---
 .github/workflows/build.yml | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d72833b62d..ac020aecdc 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -27,21 +27,22 @@ jobs:
 name: Build and analyze
 runs-on: ubuntu-latest
 steps:
-  - uses: actions/checkout@v2
+  - uses: actions/checkout@v3.3.0
 with:
   fetch-depth: 0  # Shallow clones should be disabled for a better 
relevancy of analysis
   - name: Set up JDK 11
-uses: actions/setup-java@v1
+uses: actions/setup-java@v3.10.0
 with:
   java-version: 11
+  distribution: temurin
   - name: Cache SonarCloud packages
-uses: actions/cache@v1
+uses: actions/cache@v3.2.6
 with:
   path: ~/.sonar/cache
   key: ${{ runner.os }}-sonar
   restore-keys: ${{ runner.os }}-sonar
   - name: Cache Maven packages
-uses: actions/cache@v1
+uses: actions/cache@v3.2.6
 with:
   path: ~/.m2
   key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}



[jackrabbit-oak] branch OAK-10134 updated (02cf291995 -> c4d97ffe53)

2023-03-08 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-10134
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 02cf291995 OAK-10134: Update Oak GitHub actions
 add c4d97ffe53 OAK-10134: Update Oak GitHub actions

No new revisions were added by this update.

Summary of changes:
 oak-parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[jackrabbit-oak] branch OAK-10134 updated (2ca29cbaa4 -> 02cf291995)

2023-03-08 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-10134
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 2ca29cbaa4 OAK-10134: Update Oak GitHub actions
 add 02cf291995 OAK-10134: Update Oak GitHub actions

No new revisions were added by this update.

Summary of changes:
 oak-parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[jackrabbit-oak] 01/01: OAK-10134: Update Oak GitHub actions

2023-03-07 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch OAK-10134
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 2ca29cbaa4ea4e0457bab481c241a4b3e291cd93
Author: Marcel Reutegger 
AuthorDate: Tue Mar 7 13:21:34 2023 +0100

OAK-10134: Update Oak GitHub actions

Use most recent version of actions in use
---
 .github/workflows/build.yml | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d72833b62d..ac020aecdc 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -27,21 +27,22 @@ jobs:
 name: Build and analyze
 runs-on: ubuntu-latest
 steps:
-  - uses: actions/checkout@v2
+  - uses: actions/checkout@v3.3.0
 with:
   fetch-depth: 0  # Shallow clones should be disabled for a better 
relevancy of analysis
   - name: Set up JDK 11
-uses: actions/setup-java@v1
+uses: actions/setup-java@v3.10.0
 with:
   java-version: 11
+  distribution: temurin
   - name: Cache SonarCloud packages
-uses: actions/cache@v1
+uses: actions/cache@v3.2.6
 with:
   path: ~/.sonar/cache
   key: ${{ runner.os }}-sonar
   restore-keys: ${{ runner.os }}-sonar
   - name: Cache Maven packages
-uses: actions/cache@v1
+uses: actions/cache@v3.2.6
 with:
   path: ~/.m2
   key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}



[jackrabbit-oak] branch OAK-10134 created (now 2ca29cbaa4)

2023-03-07 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-10134
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


  at 2ca29cbaa4 OAK-10134: Update Oak GitHub actions

This branch includes the following new commits:

 new 2ca29cbaa4 OAK-10134: Update Oak GitHub actions

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[jackrabbit-oak] branch trunk updated: OAK-10129: Disable Sonar checks on PRs from forks - take 2

2023-03-03 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 81e41845e3 OAK-10129: Disable Sonar checks on PRs from forks - take 2
81e41845e3 is described below

commit 81e41845e3ff3ea993624601bd376826cb2dfcd5
Author: Marcel Reutegger 
AuthorDate: Fri Mar 3 16:40:50 2023 +0100

OAK-10129: Disable Sonar checks on PRs from forks - take 2

Only run 'Build and analyze' step if sonar token is available
---
 .github/workflows/build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b585a003b9..d72833b62d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,7 +25,6 @@ on:
 jobs:
   build:
 name: Build and analyze
-if: github.repository == 'apache/jackrabbit-oak'
 runs-on: ubuntu-latest
 steps:
   - uses: actions/checkout@v2
@@ -51,4 +50,5 @@ jobs:
 env:
   GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR 
information, if any
   SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+if: ${{ env.SONAR_TOKEN != '' }}
 run: mvn -B verify 
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage 
-Dsonar.projectKey=org.apache.jackrabbit:jackrabbit-oak 
-Dsonar.organization=apache



[jackrabbit-oak] branch trunk updated: OAK-9827: Flaky test: SplitPersistenceBlobTest

2023-03-02 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 52e277397a OAK-9827: Flaky test: SplitPersistenceBlobTest
 new b905874954 Merge pull request #859 from mreutegg/OAK-9827
52e277397a is described below

commit 52e277397a4d5ca6e8b2886a7828aeb30470c945
Author: Marcel Reutegger 
AuthorDate: Fri Feb 24 14:20:59 2023 +0100

OAK-9827: Flaky test: SplitPersistenceBlobTest

Use a random suffix for test container name to prevent clashes when two 
modules are built on the same Jenkins worker.
---
 .../org/apache/jackrabbit/oak/segment/azure/AzuriteDockerRule.java   | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/oak-segment-azure/src/test/java/org/apache/jackrabbit/oak/segment/azure/AzuriteDockerRule.java
 
b/oak-segment-azure/src/test/java/org/apache/jackrabbit/oak/segment/azure/AzuriteDockerRule.java
index 231a9adc5b..a5d4bd7ec7 100644
--- 
a/oak-segment-azure/src/test/java/org/apache/jackrabbit/oak/segment/azure/AzuriteDockerRule.java
+++ 
b/oak-segment-azure/src/test/java/org/apache/jackrabbit/oak/segment/azure/AzuriteDockerRule.java
@@ -33,6 +33,7 @@ import org.junit.runners.model.Statement;
 
 import java.net.URISyntaxException;
 import java.security.InvalidKeyException;
+import java.util.UUID;
 
 public class AzuriteDockerRule implements TestRule {
 
@@ -41,12 +42,14 @@ public class AzuriteDockerRule implements TestRule {
 public static final String ACCOUNT_KEY = 
"Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==";
 public static final String ACCOUNT_NAME = "devstoreaccount1";
 
+private static final String CONTAINER_SUFFIX = 
UUID.randomUUID().toString().substring(0, 8);
+
 private final DockerRule wrappedRule;
 
 public AzuriteDockerRule() {
 wrappedRule = new DockerRule(ImmutableDockerConfig.builder()
 .image(IMAGE)
-.name("oak-test-azurite")
+.name("oak-test-azurite-" + CONTAINER_SUFFIX)
 .ports("1")
 .addStartedListener(container -> {
 container.waitForPort("1/tcp");



[jackrabbit-oak] branch trunk updated: OAK-10128: Disable coverage check for oak-jcr integration tests

2023-03-02 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 687c41c310 OAK-10128: Disable coverage check for oak-jcr integration 
tests
 new 2477e1ab37 Merge pull request #864 from mreutegg/OAK-10128
687c41c310 is described below

commit 687c41c310a04e23e9ebb500db34af22c8134382
Author: Marcel Reutegger 
AuthorDate: Thu Mar 2 15:40:50 2023 +0100

OAK-10128: Disable coverage check for oak-jcr integration tests
---
 Jenkinsfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index d89d6003af..7d368896ab 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -38,7 +38,7 @@ def buildModule(moduleSpec) {
 testOptions = '' 
 } else if (flags == 'it') {
 // integration tests only
-testOptions = '-PintegrationTesting -Dsurefire.skip.ut=true' 
+testOptions = '-PintegrationTesting -Dsurefire.skip.ut=true 
-Dskip.coverage=true' 
 }
 }
 stage(moduleSpec) {



[jackrabbit-oak] branch trunk updated: OAK-10126: Extend consistency check to cover jcr:predecessors and jcr:successors

2023-03-02 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 15fc59aff5 OAK-10126: Extend consistency check to cover 
jcr:predecessors and jcr:successors
 new c8ec8b2f6c Merge pull request #861 from mreutegg/OAK-10126
15fc59aff5 is described below

commit 15fc59aff53fb6c6f1601efab331508d03073226
Author: Marcel Reutegger 
AuthorDate: Fri Feb 24 18:08:37 2023 +0100

OAK-10126: Extend consistency check to cover jcr:predecessors and 
jcr:successors
---
 .../document/check/AsyncNodeStateProcessor.java| 24 +++-
 .../plugins/document/check/DocumentStoreCheck.java | 32 +++-
 .../plugins/document/check/ExceptionResult.java| 43 ++
 .../oak/plugins/document/check/ReferenceCheck.java | 36 +++---
 .../oak/run/DocumentStoreCheckCommand.java | 22 ++-
 5 files changed, 132 insertions(+), 25 deletions(-)

diff --git 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/AsyncNodeStateProcessor.java
 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/AsyncNodeStateProcessor.java
index df3519f48b..2ad2e0967d 100644
--- 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/AsyncNodeStateProcessor.java
+++ 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/AsyncNodeStateProcessor.java
@@ -21,6 +21,7 @@ import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
 
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
@@ -107,13 +108,14 @@ public abstract class AsyncNodeStateProcessor extends 
AsyncDocumentProcessor {
  * method will run as a task with an executor service.
  *
  * @param path the path of the {@code NodeState} to process.
- * @param state the {@code NodeState} or {@code null} if the node does not
- *  exist at this path. This may happen for nodes that have been
- *  deleted but not yet garbage collected.
- * @return optional result of the task.
+ * @param state the {@code NodeState} or {@code null} if the node
+ * does not exist at this path. This may happen for nodes that have
+ * been deleted but not yet garbage collected.
+ * @param resultConsumer consumes the results of this task.
  */
-protected abstract Optional runTask(@NotNull Path path,
-@Nullable NodeState state);
+protected abstract void runTask(@NotNull Path path,
+@Nullable NodeState state,
+@NotNull Consumer resultConsumer);
 
 protected class NodeStateTask implements Callable {
 
@@ -129,9 +131,13 @@ public abstract class AsyncNodeStateProcessor extends 
AsyncDocumentProcessor {
 
 @Override
 public Void call() throws Exception {
-Path path = document.getPath();
-NodeState state = document.getNodeAtRevision(ns, headRevision, 
null);
-runTask(path, state).ifPresent(this::collect);
+try {
+Path path = document.getPath();
+NodeState state = document.getNodeAtRevision(ns, headRevision, 
null);
+runTask(path, state, this::collect);
+} catch (Exception e) {
+collect(new ExceptionResult(e));
+}
 return null;
 }
 
diff --git 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
index 27c6b50efb..a07bbaf96c 100644
--- 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
+++ 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
@@ -43,6 +43,8 @@ import 
org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.apache.jackrabbit.JcrConstants.JCR_BASEVERSION;
+import static org.apache.jackrabbit.JcrConstants.JCR_PREDECESSORS;
+import static org.apache.jackrabbit.JcrConstants.JCR_SUCCESSORS;
 import static org.apache.jackrabbit.JcrConstants.JCR_UUID;
 import static org.apache.jackrabbit.JcrConstants.JCR_VERSIONHISTORY;
 import static org.apache.jackrabbit.oak.plugins.document.check.Result.END;
@@ -79,6 +81,10 @@ public class DocumentStoreCheck {
 
 private final boolean versionHistory;
 
+private final boolean predecessors;
+
+private final boolean successors;
+
 private final boolean uuid

[jackrabbit-oak] branch trunk updated (bff8f72e41 -> dc05a6f5c6)

2023-02-07 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from bff8f72e41 OAK-10105: Guava deprecations: set minimal logging level to 
'info' (#845)
 new eec640a97a OAK-10104: Extend version consistency check
 new 72be2fa598 OAK-10104: Extend version consistency check
 new dc05a6f5c6 Merge pull request #844 from mreutegg/OAK-10104

The 18290 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../plugins/document/check/DocumentStoreCheck.java | 19 ++-
 .../oak/plugins/document/check/ReferenceCheck.java | 48 -
 .../oak/run/DocumentStoreCheckCommand.java |  9 
 .../oak/run/DocumentStoreCheckCommandTest.java | 60 +-
 4 files changed, 130 insertions(+), 6 deletions(-)



[jackrabbit-oak] branch trunk updated (dc4a0ba7bd -> 2cb1cd3cb0)

2023-01-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from dc4a0ba7bd Merge pull request #816 from rishabhdaim/OAK-10056
 new ed19990895 OAK-10034 : created an background thread to purge unmerged 
branch commits and collision markers for non active clusters
 new 00ac096cbb OAK-10034 : added additional check to check for 
lastWrittenRootRev before purging for inactive clusters
 new df53ab2ae7 OAK-10034 : moved olderThanLastWrittenRootRev Predicate to 
ClusterNodeInfoDocument
 new 2cb1cd3cb0 Merge pull request #812 from rishabhdaim/OAK-10034

The 18208 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../plugins/document/ClusterNodeInfoDocument.java  |  17 
 .../oak/plugins/document/DocumentNodeStore.java|  48 -
 .../oak/plugins/document/NodeDocument.java |  19 ++--
 .../oak/plugins/document/UnmergedBranches.java |  21 +++-
 .../oak/plugins/document/NodeDocumentTest.java | 107 +++--
 5 files changed, 194 insertions(+), 18 deletions(-)



[jackrabbit-oak] branch trunk updated: OAK-10056 : provided support for jakarta & hyderabad region for S3

2023-01-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new dee89565e4 OAK-10056 : provided support for jakarta & hyderabad region 
for S3
 new dc4a0ba7bd Merge pull request #816 from rishabhdaim/OAK-10056
dee89565e4 is described below

commit dee89565e4bbfa1e596d2c3d490b39366f734a18
Author: Rishabh Kumar 
AuthorDate: Tue Jan 10 16:13:56 2023 +0530

OAK-10056 : provided support for jakarta & hyderabad region for S3
---
 oak-blob-cloud/pom.xml  | 2 +-
 oak-segment-aws/pom.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/oak-blob-cloud/pom.xml b/oak-blob-cloud/pom.xml
index 33e63e355f..c4fbb36258 100644
--- a/oak-blob-cloud/pom.xml
+++ b/oak-blob-cloud/pom.xml
@@ -32,7 +32,7 @@
 
 
 4.1.52.Final
-1.11.700
+1.12.353
 
 
 
diff --git a/oak-segment-aws/pom.xml b/oak-segment-aws/pom.xml
index c3338e89e5..621faf70bf 100644
--- a/oak-segment-aws/pom.xml
+++ b/oak-segment-aws/pom.xml
@@ -33,7 +33,7 @@
 Oak Segment AWS
 
 
-1.11.700
+1.12.353
 1.0.392
 
 



[jackrabbit-oak] branch trunk updated (af958d39ce -> bb7ad2fe46)

2023-01-05 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from af958d39ce OAK-10051 attach correct artifact (#810)
 new f1faa48844 OAK-10031 : purge uncommitted revisions and collisions in 
batches on boot up
 new e84a0b14a3 OAK-10031 : fixed logic to merge updateOps in batches
 new bb7ad2fe46 Merge pull request #796 from rishabhdaim/OAK-10031

The 18189 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../oak/plugins/document/DocumentNodeStore.java|  7 ++-
 .../oak/plugins/document/NodeDocument.java | 40 +++
 .../oak/plugins/document/UnmergedBranches.java |  7 +--
 .../oak/plugins/document/NodeDocumentTest.java | 57 ++
 4 files changed, 97 insertions(+), 14 deletions(-)



[jackrabbit-oak] branch trunk updated: OAK-10029: Disable Sonar checks on PRs from forks

2022-12-13 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 59050f59d5 OAK-10029: Disable Sonar checks on PRs from forks
 new 8cf62fb8a9 Merge pull request #792 from mreutegg/OAK-10029
59050f59d5 is described below

commit 59050f59d518b1c3ed620849305907531352dfab
Author: Marcel Reutegger 
AuthorDate: Tue Dec 13 10:26:19 2022 +0100

OAK-10029: Disable Sonar checks on PRs from forks
---
 .github/workflows/build.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 26db45312b..b585a003b9 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,6 +25,7 @@ on:
 jobs:
   build:
 name: Build and analyze
+if: github.repository == 'apache/jackrabbit-oak'
 runs-on: ubuntu-latest
 steps:
   - uses: actions/checkout@v2



[jackrabbit-oak] branch trunk updated: OAK-10027: CacheWarmingTest does not clean up

2022-12-13 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 219f15c78f OAK-10027: CacheWarmingTest does not clean up
 new 52f81f776f Merge pull request #791 from mreutegg/OAK-10027
219f15c78f is described below

commit 219f15c78fbd45223c396df978646f55ef46701f
Author: Marcel Reutegger 
AuthorDate: Tue Dec 13 08:40:24 2022 +0100

OAK-10027: CacheWarmingTest does not clean up
---
 .../oak/plugins/document/prefetch/CacheWarmingTest.java   | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/prefetch/CacheWarmingTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/prefetch/CacheWarmingTest.java
index d391c21fe2..b306643848 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/prefetch/CacheWarmingTest.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/prefetch/CacheWarmingTest.java
@@ -18,8 +18,6 @@ package org.apache.jackrabbit.oak.plugins.document.prefetch;
 
 import static 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.SYS_PROP_PREFETCH;
 import static 
org.apache.jackrabbit.oak.plugins.document.util.Utils.getIdFromPath;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.lessThan;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
@@ -52,6 +50,7 @@ import org.apache.jackrabbit.oak.spi.commit.EmptyHook;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.stats.Clock;
 import org.jetbrains.annotations.Nullable;
+import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -78,6 +77,11 @@ public class CacheWarmingTest {
 System.setProperty(SYS_PROP_PREFETCH, "true");
 }
 
+@AfterClass
+public static void cleanUp() {
+MongoUtils.dropCollections(MongoUtils.DB);
+}
+
 @Test
 public void noop1() {
 DocumentStore store = new MemoryDocumentStore();



[jackrabbit-oak] branch 1.8 updated (d453b3fe5a -> 216d425e64)

2022-11-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch 1.8
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from d453b3fe5a Merge pull request #768 from mreutegg/OAK-9563-1.8
 add 6aee6a90f4 OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins
 add c383c14255 OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins
 new 216d425e64 Merge pull request #766 from apache/OAK-9971-1.8

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml | 64 
 Jenkinsfile | 89 +
 2 files changed, 89 insertions(+), 64 deletions(-)
 delete mode 100644 .travis.yml
 create mode 100644 Jenkinsfile



[jackrabbit-oak] 01/01: Merge pull request #766 from apache/OAK-9971-1.8

2022-11-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch 1.8
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 216d425e64efc0141450d673aa8839611f02f95a
Merge: d453b3fe5a c383c14255
Author: Marcel Reutegger 
AuthorDate: Fri Nov 25 11:38:10 2022 +0100

Merge pull request #766 from apache/OAK-9971-1.8

OAK-9971: Migrate Oak maintenance builds from Travis CI to Jenkins

 .travis.yml | 64 
 Jenkinsfile | 89 +
 2 files changed, 89 insertions(+), 64 deletions(-)



[jackrabbit-oak] branch 1.22 updated (5197f4a078 -> 2c8fe96be9)

2022-11-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 5197f4a078 Merge pull request #770 from mreutegg/OAK-9443-1.22
 add 6e67ae7c54 OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins
 add 28a5672031 OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins
 new 2c8fe96be9 Merge pull request #765 from apache/OAK-9971-1.22

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml | 65 
 Jenkinsfile | 89 +
 2 files changed, 89 insertions(+), 65 deletions(-)
 delete mode 100644 .travis.yml
 create mode 100644 Jenkinsfile



[jackrabbit-oak] 01/01: Merge pull request #765 from apache/OAK-9971-1.22

2022-11-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 2c8fe96be915552b235981f519ee5e8fa58cf0ac
Merge: 5197f4a078 28a5672031
Author: Marcel Reutegger 
AuthorDate: Fri Nov 25 11:37:30 2022 +0100

Merge pull request #765 from apache/OAK-9971-1.22

OAK-9971: Migrate Oak maintenance builds from Travis CI to Jenkins

 .travis.yml | 65 
 Jenkinsfile | 89 +
 2 files changed, 89 insertions(+), 65 deletions(-)



[jackrabbit-oak] branch 1.22 updated: OAK-9443: Test failure: LeaseUpdateSocketTimeoutIT.leaseUpdateFailureOnSocketTimeout

2022-11-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/1.22 by this push:
 new fb82302434 OAK-9443: Test failure: 
LeaseUpdateSocketTimeoutIT.leaseUpdateFailureOnSocketTimeout
 new 5197f4a078 Merge pull request #770 from mreutegg/OAK-9443-1.22
fb82302434 is described below

commit fb82302434f00bf0dc560c2a4e063425398ba2cc
Author: Marcel Reutegger 
AuthorDate: Fri Nov 25 11:31:27 2022 +0100

OAK-9443: Test failure: 
LeaseUpdateSocketTimeoutIT.leaseUpdateFailureOnSocketTimeout

Disable test on Jenkins
Merge into 1.22 branch
---
 .../oak/plugins/document/mongo/LeaseUpdateSocketTimeoutIT.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/LeaseUpdateSocketTimeoutIT.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/LeaseUpdateSocketTimeoutIT.java
index 5b3d737266..3c61b1a5f2 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/LeaseUpdateSocketTimeoutIT.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/LeaseUpdateSocketTimeoutIT.java
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import org.apache.jackrabbit.oak.commons.CIHelper;
 import org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo;
 import org.apache.jackrabbit.oak.plugins.document.DocumentStore;
 import org.apache.jackrabbit.oak.plugins.document.DocumentStoreException;
@@ -46,6 +47,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeFalse;
 import static org.junit.Assume.assumeTrue;
 
 public class LeaseUpdateSocketTimeoutIT {
@@ -81,6 +83,7 @@ public class LeaseUpdateSocketTimeoutIT {
 @BeforeClass
 public static void dockerAvailable() {
 assumeTrue(MongoDockerRule.isDockerAvailable());
+assumeFalse(CIHelper.jenkins()); // OAK-9443
 }
 
 @Before



[jackrabbit-oak] branch 1.22 updated: OAK-9487: WarnLogStringPropertySizeTest may fail with multiple fixtures

2022-11-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/1.22 by this push:
 new 5c41f0030c OAK-9487: WarnLogStringPropertySizeTest may fail with 
multiple fixtures
 new a6ff97c479 Merge pull request #769 from mreutegg/OAK-9487-1.22
5c41f0030c is described below

commit 5c41f0030cb3d6c5b1946ec720da587c196444cf
Author: Marcel Reutegger 
AuthorDate: Tue Jul 6 13:42:45 2021 +0200

OAK-9487: WarnLogStringPropertySizeTest may fail with multiple fixtures

Prevent parallel execution with Parameterized runner
---
 .../jackrabbit/oak/jcr/session/WarnLogStringPropertySizeTest.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/session/WarnLogStringPropertySizeTest.java
 
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/session/WarnLogStringPropertySizeTest.java
index 0ffc07d05c..e87f7cfde1 100644
--- 
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/session/WarnLogStringPropertySizeTest.java
+++ 
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/session/WarnLogStringPropertySizeTest.java
@@ -26,6 +26,8 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 import org.slf4j.LoggerFactory;
 
 import javax.jcr.Node;
@@ -38,6 +40,7 @@ import static org.junit.Assert.assertTrue;
  * {@code WarnLogStringPropertySizeTest} checks if Warn log is bein added on 
adding
  * large string properties
  */
+@RunWith(Parameterized.class)
 public class WarnLogStringPropertySizeTest extends AbstractRepositoryTest {
 
 @Rule



[jackrabbit-oak] branch OAK-9971-1.8 updated (34b2f5740b -> c383c14255)

2022-11-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-9971-1.8
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


 discard 34b2f5740b OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins
 add e3c8a553cb OAK-9563: LastRevSingleNodeRecoveryTest fails in setUp()
 add d453b3fe5a Merge pull request #768 from mreutegg/OAK-9563-1.8
 add 6aee6a90f4 OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins
 add c383c14255 OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (34b2f5740b)
\
 N -- N -- N   refs/heads/OAK-9971-1.8 (c383c14255)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 Jenkinsfile  | 4 ++--
 .../oak/plugins/document/LastRevSingleNodeRecoveryTest.java  | 9 +++--
 2 files changed, 9 insertions(+), 4 deletions(-)



[jackrabbit-oak] branch OAK-9971-1.22 updated (c5127e990c -> 28a5672031)

2022-11-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-9971-1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


 discard c5127e990c OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins
 add 67dd68aa2f OAK-9563: LastRevSingleNodeRecoveryTest fails in setUp()
 add 00baf59055 Merge pull request #767 from mreutegg/OAK-9563-1.22
 add 6e67ae7c54 OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins
 add 28a5672031 OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (c5127e990c)
\
 N -- N -- N   refs/heads/OAK-9971-1.22 (28a5672031)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 Jenkinsfile  | 2 +-
 .../oak/plugins/document/LastRevSingleNodeRecoveryTest.java  | 9 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)



[jackrabbit-oak] branch 1.8 updated: OAK-9563: LastRevSingleNodeRecoveryTest fails in setUp()

2022-11-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch 1.8
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/1.8 by this push:
 new e3c8a553cb OAK-9563: LastRevSingleNodeRecoveryTest fails in setUp()
 new d453b3fe5a Merge pull request #768 from mreutegg/OAK-9563-1.8
e3c8a553cb is described below

commit e3c8a553cb737ec28ccbf6c2b524e7c04c70615e
Author: Marcel Reutegger 
AuthorDate: Thu Nov 24 17:57:54 2022 +0100

OAK-9563: LastRevSingleNodeRecoveryTest fails in setUp()

Merge into 1.8 branch
---
 .../oak/plugins/document/LastRevSingleNodeRecoveryTest.java  | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/LastRevSingleNodeRecoveryTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/LastRevSingleNodeRecoveryTest.java
index ef915d8b75..9e96dc52f3 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/LastRevSingleNodeRecoveryTest.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/LastRevSingleNodeRecoveryTest.java
@@ -91,6 +91,9 @@ public class LastRevSingleNodeRecoveryTest {
 @Before
 public void setUp() throws InterruptedException {
 try {
+if (fixture instanceof DocumentStoreFixture.MongoFixture) {
+MongoUtils.dropCollections(MongoUtils.DB);
+}
 mk = createMK(0);
 Assume.assumeNotNull(mk);
 
@@ -230,8 +233,10 @@ public class LastRevSingleNodeRecoveryTest {
 public void tearDown() throws Exception {
 Revision.resetClockToDefault();
 ClusterNodeInfo.resetClockToDefault();
-mk.dispose();
-if ( mk2 != null ) {
+if (mk != null) {
+mk.dispose();
+}
+if (mk2 != null) {
 mk2.dispose();
 }
 fixture.dispose();



[jackrabbit-oak] branch 1.22 updated: OAK-9563: LastRevSingleNodeRecoveryTest fails in setUp()

2022-11-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/1.22 by this push:
 new 67dd68aa2f OAK-9563: LastRevSingleNodeRecoveryTest fails in setUp()
 new 00baf59055 Merge pull request #767 from mreutegg/OAK-9563-1.22
67dd68aa2f is described below

commit 67dd68aa2fcd1f89df35e2a4e34df9f62ae44555
Author: Marcel Reutegger 
AuthorDate: Thu Nov 24 17:48:02 2022 +0100

OAK-9563: LastRevSingleNodeRecoveryTest fails in setUp()

Merge into 1.22 branch
---
 .../oak/plugins/document/LastRevSingleNodeRecoveryTest.java  | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/LastRevSingleNodeRecoveryTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/LastRevSingleNodeRecoveryTest.java
index d2064f5813..db0ecd09db 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/LastRevSingleNodeRecoveryTest.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/LastRevSingleNodeRecoveryTest.java
@@ -91,6 +91,9 @@ public class LastRevSingleNodeRecoveryTest {
 @Before
 public void setUp() throws InterruptedException {
 try {
+if (fixture instanceof DocumentStoreFixture.MongoFixture) {
+MongoUtils.dropCollections(MongoUtils.DB);
+}
 mk = createMK(0);
 Assume.assumeNotNull(mk);
 
@@ -230,8 +233,10 @@ public class LastRevSingleNodeRecoveryTest {
 public void tearDown() throws Exception {
 Revision.resetClockToDefault();
 ClusterNodeInfo.resetClockToDefault();
-mk.dispose();
-if ( mk2 != null ) {
+if (mk != null) {
+mk.dispose();
+}
+if (mk2 != null) {
 mk2.dispose();
 }
 fixture.dispose();



[jackrabbit-oak] 01/01: OAK-9971: Migrate Oak maintenance builds from Travis CI to Jenkins

2022-11-24 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch OAK-9971-1.8
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 34b2f5740b0416cb43b704d87db22ae7a6d7e73c
Author: Marcel Reutegger 
AuthorDate: Thu Nov 24 17:29:57 2022 +0100

OAK-9971: Migrate Oak maintenance builds from Travis CI to Jenkins
---
 .travis.yml | 64 
 Jenkinsfile | 89 +
 2 files changed, 89 insertions(+), 64 deletions(-)

diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index ba5beccb36..00
--- a/.travis.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-sudo: false
-dist: xenial
-services:
-  - docker
-env:
-  global:
-- MONGODB=3.6.17
-  matrix:
-- MODULE=oak-jcr PROFILE="-PintegrationTesting" 
UT="-Dsurefire.skip.ut=true" MONGODB_MODE="--single"
-- MODULE=oak-jcr PROFILE="" UT="" MONGODB_MODE="--single"
-- MODULE=oak-store-document PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-lucene PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-it PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-run PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-upgrade PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-pojosr PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-it-osgi PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-before_install:
-  - docker pull trekawek/azurite
-install:
-  - wget -N 
http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz -P 
$HOME/.mongodb
-  - tar --skip-old-files -C $HOME/.mongodb -xf 
$HOME/.mongodb/mongodb-linux-x86_64-${MONGODB}.tgz
-  - mkdir -p target/mongodb/data
-  - cd target/mongodb
-  - pyenv versions
-  - pyenv install 3.6.3
-  - pyenv global 3.6.3
-  - python -V
-  - python -m venv mtools
-  - source mtools/bin/activate
-  - pip install --upgrade pip
-  - pip install python-dateutil psutil pymongo mtools
-  - mlaunch init ${MONGODB_MODE} --binarypath 
$HOME/.mongodb/mongodb-linux-x86_64-${MONGODB}/bin --dir 
${TRAVIS_BUILD_DIR}/target/mongodb/data
-  - cd $TRAVIS_BUILD_DIR
-  - mvn --batch-mode -DskipTests -Dbaseline.skip=true install -pl :${MODULE} 
-am -nsu
-script:   mvn --batch-mode clean verify -DtrimStackTrace=false 
-Dbaseline.skip=true ${UT} ${PROFILE} -Dnsfixtures=DOCUMENT_NS -pl :${MODULE} 
-nsu
-language: java
-jdk:
-  - openjdk8
-cache:
-  directories:
-- $HOME/.m2
-- $HOME/.mongodb
-addons:
-  apt:
-packages:
-  - python-pip
-notifications:
-  email: false
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 00..c773f7069b
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,89 @@
+#!/usr/bin/env groovy
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// schedule oak-jcr:ut,oak-search-elastic,oak-segment-tar,oak-store-document 
first
+// because they are longest running modules
+def OAK_MODULES = 
'oak-jcr

[jackrabbit-oak] branch OAK-9971-1.8 created (now 34b2f5740b)

2022-11-24 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-9971-1.8
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


  at 34b2f5740b OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins

This branch includes the following new commits:

 new 34b2f5740b OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[jackrabbit-oak] 01/01: OAK-9971: Migrate Oak maintenance builds from Travis CI to Jenkins

2022-11-24 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch OAK-9971-1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit c5127e990c2bb81f346451f9b2d6f5ca7bb4881d
Author: Marcel Reutegger 
AuthorDate: Thu Nov 24 16:23:18 2022 +0100

OAK-9971: Migrate Oak maintenance builds from Travis CI to Jenkins
---
 .travis.yml | 65 
 Jenkinsfile | 89 +
 2 files changed, 89 insertions(+), 65 deletions(-)

diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index baaf0a0be8..00
--- a/.travis.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-sudo: false
-dist: xenial
-services:
-  - docker
-env:
-  global:
-- MONGODB=4.0.16
-  matrix:
-- MODULE=oak-jcr PROFILE="-PintegrationTesting" 
UT="-Dsurefire.skip.ut=true" MONGODB_MODE="--single"
-- MODULE=oak-jcr PROFILE="" UT="" MONGODB_MODE="--single"
-- MODULE=oak-store-document PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-store-document PROFILE="-PintegrationTesting,replicaset" 
UT="" MONGODB_MODE="--replicaset"
-- MODULE=oak-lucene PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-it PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-run PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-upgrade PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-pojosr PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-- MODULE=oak-it-osgi PROFILE="-PintegrationTesting" UT="" 
MONGODB_MODE="--single"
-before_install:
-  - docker pull trekawek/azurite
-install:
-  - wget -N 
http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz -P 
$HOME/.mongodb
-  - tar --skip-old-files -C $HOME/.mongodb -xf 
$HOME/.mongodb/mongodb-linux-x86_64-${MONGODB}.tgz
-  - mkdir -p target/mongodb/data
-  - cd target/mongodb
-  - pyenv versions
-  - pyenv install 3.6.3
-  - pyenv global 3.6.3
-  - python -V
-  - python -m venv mtools
-  - source mtools/bin/activate
-  - pip install --upgrade pip
-  - pip install python-dateutil psutil pymongo mtools
-  - mlaunch init ${MONGODB_MODE} --binarypath 
$HOME/.mongodb/mongodb-linux-x86_64-${MONGODB}/bin --dir 
${TRAVIS_BUILD_DIR}/target/mongodb/data
-  - cd $TRAVIS_BUILD_DIR
-  - mvn --batch-mode -DskipTests -Dbaseline.skip=true install -pl :${MODULE} 
-am -nsu
-script:   mvn --batch-mode clean verify -DtrimStackTrace=false 
-Dbaseline.skip=true ${UT} ${PROFILE} -Dnsfixtures=DOCUMENT_NS -pl :${MODULE} 
-nsu
-language: java
-jdk:
-  - openjdk8
-cache:
-  directories:
-- $HOME/.m2
-- $HOME/.mongodb
-addons:
-  apt:
-packages:
-  - python-pip
-notifications:
-  email: false
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 00..c773f7069b
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,89 @@
+#!/usr/bin/env groovy
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// schedule

[jackrabbit-oak] branch OAK-9971-1.22 created (now c5127e990c)

2022-11-24 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-9971-1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


  at c5127e990c OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins

This branch includes the following new commits:

 new c5127e990c OAK-9971: Migrate Oak maintenance builds from Travis CI to 
Jenkins

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[jackrabbit-oak] branch trunk updated: fixed flaky test using JsonParser

2022-11-23 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 321e336e40 fixed flaky test using JsonParser
 new d0c2e82ce4 Merge pull request #763 from tt0suzy/OAK-10010
321e336e40 is described below

commit 321e336e40cfc4a0b94c3bda895ad5506d53cec4
Author: Yihen Liu 
AuthorDate: Wed Nov 23 11:35:55 2022 -0600

fixed flaky test using JsonParser
---
 .../apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
index ecb63c2928..d662c0b8da 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
@@ -35,6 +35,7 @@ import org.apache.jackrabbit.oak.commons.json.JsopTokenizer;
 import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore;
 import org.junit.Rule;
 import org.junit.Test;
+import com.google.gson.JsonParser;
 
 /**
  * A simple randomized dual-instance test.
@@ -321,11 +322,12 @@ public class RandomizedClusterTest {
 assertTrue("path: " + p + " is supposed to exist",
 mk.nodeExists(p, head));
 }
+JsonParser parser = new JsonParser();
 String expected = "{\":childNodeCount\":0,\"x\":" + value + "}";
 String result = mk.getNodes(p, head, 0, 0, Integer.MAX_VALUE, null);
 expected = normalize(expected);
 result = normalize(result);
-assertEquals(expected, result);
+assertEquals(parser.parse(expected), parser.parse(result));
 return true;
 }
 



[jackrabbit-oak] branch trunk updated (181fba001d -> 40acf2aec2)

2022-11-15 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 181fba001d OAK-9996: oak-search-mt: unneeded Guava import declaration 
(#754)
 new b4a2405148 OAK-9993: Add utility method to remove unmerged branches
 new 0349a92b66 OAK-9993: Add utility method to remove unmerged branches
 new 40acf2aec2 Merge pull request #753 from mreutegg/OAK-9993

The 18112 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 oak-run/src/main/js/oak-mongo.js | 70 +++-
 1 file changed, 69 insertions(+), 1 deletion(-)



[jackrabbit-oak] branch trunk updated (c413fdc609 -> 6c04951be7)

2022-11-15 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from c413fdc609 OAK-9995: oak-blob-cloud-azure: unneeded Guava import 
declaration (#752)
 new 11bb384e47 OAK-9992: Introduce limit for oak.removeCollisions()
 new f4b1b08ec7 OAK-9992: Introduce limit for oak.removeCollisions()
 new f21ea48d54 Update oak-run/src/main/js/oak-mongo.js
 new 695cbad186 Merge branch 'OAK-9992' of 
github.com:mreutegg/jackrabbit-oak into OAK-9992
 new 6c04951be7 Merge pull request #750 from mreutegg/OAK-9992

The 18108 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 oak-run/src/main/js/oak-mongo.js | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)



[jackrabbit-oak] branch trunk updated: OAK-9967 : handled case to send lease update time in case of exception

2022-10-28 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new dab01418d5 OAK-9967 : handled case to send lease update time in case 
of exception
 new 2de9104ee9 Merge pull request #739 from rishabhdaim/OAK-9967
dab01418d5 is described below

commit dab01418d50d5f3a7d9e40d3eb197317b9d640bf
Author: Rishabh Kumar 
AuthorDate: Thu Oct 27 13:38:47 2022 +0530

OAK-9967 : handled case to send lease update time in case of exception
---
 .../oak/plugins/document/DocumentNodeStore.java| 16 --
 .../plugins/document/DocumentNodeStoreTest.java| 62 ++
 2 files changed, 74 insertions(+), 4 deletions(-)

diff --git 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
index 636a75c485..46f055d40a 100644
--- 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
+++ 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
@@ -2357,11 +2357,19 @@ public final class DocumentNodeStore
  */
 boolean renewClusterIdLease() {
 Stopwatch sw = Stopwatch.createStarted();
-boolean renewed = clusterNodeInfo.renewLease();
-if (renewed) {
-nodeStoreStatsCollector.doneLeaseUpdate(sw.elapsed(MICROSECONDS));
+boolean renewedOrException = true;
+try {
+renewedOrException = clusterNodeInfo.renewLease();
+} finally {
+// we need to collect the stats if,
+// 1. Either lease had been renewed
+// 2. or there is exception while renewing the lease i.e lease 
renewal failed/timed out
+// In case lease is not renewed (can happen if it had not 
expired), we don't collect the stats
+if (renewedOrException) {
+
nodeStoreStatsCollector.doneLeaseUpdate(sw.elapsed(MICROSECONDS));
+}
 }
-return renewed;
+return renewedOrException;
 }
 
 /**
diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
index 7851ff1eef..0984961f53 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
@@ -20,6 +20,7 @@ import static com.google.common.collect.ImmutableList.of;
 import static java.util.Collections.emptyList;
 import static java.util.Collections.synchronizedList;
 import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.apache.commons.lang3.reflect.FieldUtils.writeField;
 import static org.apache.jackrabbit.oak.api.CommitFailedException.CONSTRAINT;
 import static 
org.apache.jackrabbit.oak.plugins.document.Collection.CLUSTER_NODES;
 import static org.apache.jackrabbit.oak.plugins.document.Collection.JOURNAL;
@@ -49,7 +50,11 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.lang.management.ManagementFactory;
@@ -413,6 +418,63 @@ public class DocumentNodeStoreTest {
 }
 // END -- OAK-9909
 
+// OAK-9967
+@Test
+public void renewClusterIdLeaseTrue() throws IllegalAccessException {
+DocumentStore documentStore = new MemoryDocumentStore();
+
+DocumentNodeStoreStatsCollector statsCollector = 
mock(DocumentNodeStoreStatsCollector.class);
+doNothing().when(statsCollector).doneLeaseUpdate(anyLong());
+
+ClusterNodeInfo clusterNodeInfo = mock(ClusterNodeInfo.class);
+when(clusterNodeInfo.renewLease()).thenReturn(true);
+
+DocumentNodeStore nodeStore = 
builderProvider.newBuilder().setNodeStoreStatsCollector(statsCollector)
+.setDocumentStore(documentStore).getNodeStore();
+writeField(nodeStore, "clusterNodeInfo", clusterNodeInfo, true);
+
+assertTrue(nodeStore.renewClusterIdLease());
+verify(statsCollector, times(1)).doneLeaseUpdate(anyLong());
+}
+
+@Test(expected = DocumentStoreException.class)
+public void renewClusterIdLeaseException() throws IllegalAccessException {
+DocumentStore documentStore = new MemoryDoc

[jackrabbit-oak] branch 1.22 updated: OAK-9925: update MongoDB Java Driver dependency to 3.12.11

2022-10-11 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/1.22 by this push:
 new 7dcceeae6b OAK-9925: update MongoDB Java Driver dependency to 3.12.11
 new a1e11d2f2d Merge pull request #730 from mreutegg/OAK-9925-1.22
7dcceeae6b is described below

commit 7dcceeae6b1cbe15868d0c182c56df066c83305c
Author: Marcel Reutegger 
AuthorDate: Mon Oct 10 17:17:42 2022 +0200

OAK-9925: update MongoDB Java Driver dependency to 3.12.11

Backport to 1.22 branch
---
 oak-parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oak-parent/pom.xml b/oak-parent/pom.xml
index 79f204a349..d5ac987963 100644
--- a/oak-parent/pom.xml
+++ b/oak-parent/pom.xml
@@ -54,7 +54,7 @@
 SegmentMK
 4.7.1
 8.11.1
-3.12.7
+3.12.11
 1.7.32
 1.7.32 
 1.2.10



[jackrabbit-oak] branch trunk updated (4c454058b3 -> 9a909a1368)

2022-09-29 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 4c454058b3 OAK-9954 : Dynamic membership/group should spot conflicts 
with existing groups (#725)
 new b8dc091854 OAK-9913 : added metrics for mongo document store 
throttling feature
 new 2cd6406f5d OAK-9913 : incorporated review comments to reduce scope of 
variables in DocumentStoreStats and removed @Before from test classes
 new 184843b84a OAK-9913 : incorporated review comments to remove 
unnecessary classes and removed throttling metrics
 new bb35690fac OAK-9913 : seperated out throttling collector from current 
stats collector and only initializing this when throttling is enabled
 new deb151cd4d OAK-9913 : make changes in DocumentNodeStoreBuilder to 
forbid returning null for ThrottlingStatsCollector
 new 9a909a1368 Merge pull request #690 from rishabhdaim/OAK-9913

The 18066 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../oak/plugins/document/DocumentNodeStore.java|   2 +-
 .../plugins/document/DocumentNodeStoreBuilder.java |  15 ++
 .../plugins/document/DocumentNodeStoreService.java |   6 +
 .../oak/plugins/document/DocumentStoreStats.java   | 123 +---
 .../plugins/document/ThrottlingStatsCollector.java |  68 +++
 .../document/ThrottlingStatsCollectorImpl.java | 143 ++
 .../oak/plugins/document/util/BiStatsConsumer.java |  38 ++--
 .../plugins/document/util/CreateMetricUpdater.java |  77 
 .../plugins/document/util/ModifyMetricUpdater.java |  92 +
 .../plugins/document/util/RemoveMetricUpdater.java |  60 ++
 .../plugins/document/util/StatsCollectorUtil.java  |  84 
 .../util/ThrottlingDocumentStoreWrapper.java   | 100 --
 .../plugins/document/util/TriStatsConsumer.java|  45 +
 .../plugins/document/util/UpsertMetricUpdater.java |  64 ++
 .../plugins/document/DocumentNodeStoreTest.java|   8 +-
 .../plugins/document/DocumentStoreStatsTest.java   |  83 +++-
 .../document/ThrottlingStatsCollectorImplTest.java | 214 +
 .../oak/plugins/document/util/BaseUpdaterTest.java |  79 
 .../document/util/CreateMetricUpdaterTest.java | 166 
 .../document/util/ModifyMetricUpdaterTest.java | 158 +++
 .../document/util/RemoveMetricUpdaterTest.java |  85 
 .../util/ThrottlingDocumentStoreWrapperTest.java   |  32 +--
 .../document/util/UpsertMetricUpdaterTest.java |  97 ++
 23 files changed, 1701 insertions(+), 138 deletions(-)
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/ThrottlingStatsCollector.java
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/ThrottlingStatsCollectorImpl.java
 copy 
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/metric/MeterImpl.java 
=> 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/BiStatsConsumer.java
 (55%)
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/CreateMetricUpdater.java
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/ModifyMetricUpdater.java
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/RemoveMetricUpdater.java
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/StatsCollectorUtil.java
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TriStatsConsumer.java
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/UpsertMetricUpdater.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/ThrottlingStatsCollectorImplTest.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/util/BaseUpdaterTest.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/util/CreateMetricUpdaterTest.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/util/ModifyMetricUpdaterTest.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/util/RemoveMetricUpdaterTest.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/util/UpsertMetricUpdaterTest.java



[jackrabbit-oak] branch 1.22 updated: OAK-9891:added fix of issue 'Removal (purge) of version of a node does not remove associated labels' to 1.22 branch

2022-09-29 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/1.22 by this push:
 new 37a682d654 OAK-9891:added fix of issue 'Removal (purge) of version of 
a node does not remove associated labels' to 1.22 branch
 new cadb87b872 Merge pull request #716 from ArunOnCloud/1.22
37a682d654 is described below

commit 37a682d654cd74fa2052ab533f20898bd346b06a
Author: arunram 
AuthorDate: Thu Sep 22 14:44:36 2022 +0530

OAK-9891:added fix of issue 'Removal (purge) of version of a node does not 
remove associated labels' to 1.22 branch
---
 .../plugins/version/ReadWriteVersionManager.java   |  2 +-
 .../oak/jcr/version/VersionHistoryTest.java| 41 ++
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git 
a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadWriteVersionManager.java
 
b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadWriteVersionManager.java
index ed0dbfae42..ca27c4bd30 100644
--- 
a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadWriteVersionManager.java
+++ 
b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadWriteVersionManager.java
@@ -183,7 +183,7 @@ public class ReadWriteVersionManager extends 
ReadOnlyVersionManager {
 NodeBuilder versionNode = vh.getChildNode(versionName);
 String versionId = 
versionNode.getProperty(JCR_UUID).getValue(Type.STRING);
 // unregister from labels
-for (String label : getVersionLabels(versionRelPath, versionId)) {
+for (String label : getVersionLabels(historyRelPath, versionId)) {
 removeVersionLabel(historyRelPath, label);
 }
 // reconnected predecessors and successors of the version being removed
diff --git 
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/version/VersionHistoryTest.java
 
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/version/VersionHistoryTest.java
index 2e99325f8e..e46cd3e1ec 100644
--- 
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/version/VersionHistoryTest.java
+++ 
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/version/VersionHistoryTest.java
@@ -19,12 +19,17 @@ package org.apache.jackrabbit.oak.jcr.version;
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
+import javax.jcr.version.Version;
 import javax.jcr.version.VersionHistory;
+import javax.jcr.version.VersionIterator;
 import javax.jcr.version.VersionManager;
 
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.test.AbstractJCRTest;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Contains {@link VersionHistory} related tests.
  */
@@ -123,4 +128,40 @@ public class VersionHistoryTest extends AbstractJCRTest {
 assertTrue("Session.getNodeByUUID() did not return VersionHistory 
object for a nt:versionHistory node.",
 superuser.getNodeByUUID(uuid) instanceof VersionHistory);
 }
+
+public void testRemoveVersionLabelWithRemovalOfVersion() throws 
RepositoryException {
+int createVersions = 3;
+Node n = testRootNode.addNode(nodeName1, testNodeType);
+n.addMixin(mixVersionable);
+superuser.save();
+for (int i = 0; i < createVersions; i++) {
+versionManager.checkout(n.getPath());
+versionManager.checkin(n.getPath());
+}
+
+VersionHistory vhr = versionManager.getVersionHistory(n.getPath());
+// initialize versionName
+String versionName = "";
+VersionIterator allversions = vhr.getAllVersions();
+int count = 0;
+while (allversions.hasNext()) {
+Version version = allversions.nextVersion();
+if(count == 1) {
+versionName = version.getName();
+}
+count++;
+}
+int versionLabelCount = 3;
+List versionLabels = new ArrayList<>();
+for(int i = 0; i < versionLabelCount; i++) {
+String labelName = "Label_" + versionName + "_" + i;
+vhr.addVersionLabel(versionName, labelName,false);
+versionLabels.add(labelName);
+}
+vhr.removeVersion(versionName);
+for(String label : versionLabels) {
+assertFalse("version label should not exist", 
vhr.hasVersionLabel(label));
+}
+
+}
 }
\ No newline at end of file



[jackrabbit-oak] branch trunk updated (99030034ae -> 9f81e5920a)

2022-09-27 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 99030034ae OAK-9926: upgrade h2db to 2.1.214 (#722)
 new 5bca9faffe OAK-9946: Consistency check for versionable nodes
 new dae2513c50 OAK-9946: Consistency check for versionable nodes
 new 9f81e5920a Merge pull request #708 from mreutegg/OAK-9946

The 18055 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 oak-run/README.md  |  26 ++--
 .../{Summary.java => AsyncDocumentProcessor.java}  |  40 ++
 .../document/check/AsyncNodeStateProcessor.java| 147 +
 .../plugins/document/check/DocumentProcessor.java  |   2 +-
 .../plugins/document/check/DocumentStoreCheck.java |  68 +-
 .../plugins/document/check/OrphanedNodeCheck.java  |  56 ++--
 .../oak/plugins/document/check/Progress.java   |   4 +-
 .../plugins/document/check/ProgressWithETA.java|   2 +
 .../oak/plugins/document/check/ReferenceCheck.java |  96 ++
 .../oak/run/DocumentStoreCheckCommand.java |  18 +++
 .../oak/run/DocumentStoreCheckCommandTest.java |  56 +++-
 11 files changed, 426 insertions(+), 89 deletions(-)
 copy 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/{Summary.java
 => AsyncDocumentProcessor.java} (51%)
 create mode 100644 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/AsyncNodeStateProcessor.java
 create mode 100644 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/ReferenceCheck.java



[jackrabbit-oak] branch trunk updated (e5a0f330cc -> 1079a65dbb)

2022-09-16 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from e5a0f330cc Merge pull request #228 from 
larsgrefer/performance/boxing/store-spi
 new d7f0385a67 OAK-9918: DocumentNodeStore consistency check
 new 8fa50aa52b OAK-9918: DocumentNodeStore consistency check
 new f05f862167 OAK-9918: DocumentNodeStore consistency check
 new d9b47a7832 OAK-9918: DocumentNodeStore consistency check
 new 1079a65dbb Merge pull request #683 from mreutegg/OAK-9918

The 18036 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 oak-run/README.md  |  32 +++
 .../document/check/CompositeDocumentProcessor.java |  63 ++
 .../plugins/document/check/DocumentProcessor.java  |  60 ++
 .../plugins/document/check/DocumentStoreCheck.java | 219 +
 .../jackrabbit/oak/plugins/document/check/ETA.java |  48 +++--
 .../plugins/document/check/OrphanedNodeCheck.java  | 167 
 .../oak/plugins/document/check/Progress.java   |  64 ++
 .../plugins/document/check/ProgressWithETA.java|  51 +
 .../oak/plugins/document/check/Result.java |  11 +-
 .../oak/plugins/document/check/ResultWriter.java   |  33 ++--
 .../oak/plugins/document/check/Summary.java|  59 ++
 .../mongo/MongoDocumentStoreCheckHelper.java   |  33 ++--
 .../apache/jackrabbit/oak/run/AvailableModes.java  |   1 +
 .../oak/run/DocumentStoreCheckCommand.java | 143 ++
 ...est.java => DocumentStoreCheckCommandTest.java} |  82 
 15 files changed, 972 insertions(+), 94 deletions(-)
 create mode 100644 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/CompositeDocumentProcessor.java
 create mode 100644 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentProcessor.java
 create mode 100644 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/DocumentStoreCheck.java
 copy 
oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/PrintableStopwatch.java
 => 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/ETA.java 
(50%)
 create mode 100644 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/OrphanedNodeCheck.java
 create mode 100644 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/Progress.java
 create mode 100644 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/ProgressWithETA.java
 copy 
oak-core/src/main/java/org/apache/jackrabbit/oak/query/plan/ExecutionPlan.java 
=> 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/Result.java
 (83%)
 copy 
oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/client/GetHeadResponseHandler.java
 => 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/ResultWriter.java
 (52%)
 create mode 100644 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/check/Summary.java
 copy 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoClock.java
 => 
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStoreCheckHelper.java
 (51%)
 create mode 100644 
oak-run/src/main/java/org/apache/jackrabbit/oak/run/DocumentStoreCheckCommand.java
 copy 
oak-run/src/test/java/org/apache/jackrabbit/oak/run/{RevisionsCommandCustomBlobStoreTest.java
 => DocumentStoreCheckCommandTest.java} (58%)



[jackrabbit-oak] branch trunk updated: Remove unnecessary (un)boxing in oak-store-spi

2022-09-16 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new ec7fb8b2b9 Remove unnecessary (un)boxing in oak-store-spi
 new e5a0f330cc Merge pull request #228 from 
larsgrefer/performance/boxing/store-spi
ec7fb8b2b9 is described below

commit ec7fb8b2b9029222debaeecfd53e4625d8af0ad3
Author: Lars Grefer 
AuthorDate: Wed May 20 20:28:17 2020 +0200

Remove unnecessary (un)boxing in oak-store-spi
---
 .../src/main/java/org/apache/jackrabbit/oak/json/JsonSerializer.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/json/JsonSerializer.java
 
b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/json/JsonSerializer.java
index 4d589f4334..24d5e47215 100644
--- 
a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/json/JsonSerializer.java
+++ 
b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/json/JsonSerializer.java
@@ -268,9 +268,9 @@ public class JsonSerializer {
 
 public void serialize(PropertyState property, Type type, int index) {
 if (type == BOOLEAN) {
-json.value(property.getValue(BOOLEAN, index).booleanValue());
+json.value(property.getValue(BOOLEAN, index));
 } else if (type == LONG) {
-json.value(property.getValue(LONG, index).longValue());
+json.value(property.getValue(LONG, index));
 } else if (type == DOUBLE) {
 Double value = property.getValue(DOUBLE, index);
 if (value.isNaN() || value.isInfinite()) {



[jackrabbit-oak] branch trunk updated: Remove unnecessary (un)boxing in oak-webapp

2022-09-16 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new f6279979cb Remove unnecessary (un)boxing in oak-webapp
 new 04372c77cd Merge pull request #229 from 
larsgrefer/performance/boxing/webapp
f6279979cb is described below

commit f6279979cb4ff3d531f96d8ee5805c863bc47e9f
Author: Lars Grefer 
AuthorDate: Wed May 20 20:30:03 2020 +0200

Remove unnecessary (un)boxing in oak-webapp
---
 .../webapp/src/main/java/org/apache/jackrabbit/j2ee/JNDIConfig.java | 2 +-
 .../webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java  | 4 ++--
 oak-examples/webapp/src/main/webapp/search.jsp  | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/JNDIConfig.java 
b/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/JNDIConfig.java
index 46ddb33038..2f2376c2f1 100644
--- 
a/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/JNDIConfig.java
+++ 
b/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/JNDIConfig.java
@@ -69,7 +69,7 @@ public class JNDIConfig extends AbstractConfig {
 }
 
 public void setJndiEnabled(String jndiEnabled) {
-this.jndiEnabled = Boolean.valueOf(jndiEnabled).booleanValue();
+this.jndiEnabled = Boolean.valueOf(jndiEnabled);
 }
 
 public Properties getJndiEnv() {
diff --git 
a/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java 
b/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java
index 6b77e6c6ef..84f98b0df3 100644
--- 
a/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java
+++ 
b/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java
@@ -89,7 +89,7 @@ public class RMIConfig extends AbstractConfig {
 }
 
 public void setRmiEnabled(String rmiEnabled) {
-this.rmiEnabled = Boolean.valueOf(rmiEnabled).booleanValue();
+this.rmiEnabled = Boolean.valueOf(rmiEnabled);
 }
 
 public int rmiPort() {
@@ -101,7 +101,7 @@ public class RMIConfig extends AbstractConfig {
 }
 
 public void setRmiPort(String rmiPort) {
-this.rmiPort = Integer.decode(rmiPort).intValue();
+this.rmiPort = Integer.decode(rmiPort);
 }
 
 public String getRmiHost() {
diff --git a/oak-examples/webapp/src/main/webapp/search.jsp 
b/oak-examples/webapp/src/main/webapp/search.jsp
index 7032f0cbf8..6aec8bf43c 100644
--- a/oak-examples/webapp/src/main/webapp/search.jsp
+++ b/oak-examples/webapp/src/main/webapp/search.jsp
@@ -110,7 +110,7 @@
 maxPage = Math.min(maxPage, currentPageIndex + 10);
 minPage = Math.max(0, currentPageIndex - 10);
 for (long i = minPage; i < maxPage; i++) {
-indexes.add(new Long(i));
+indexes.add(i);
 }
 
 if (total < 10 && !q.startsWith("related:")) {
@@ -203,13 +203,13 @@ request.setAttribute("title", "Search workspace " + 
wspName);
   
 ResultPage:
 <%
-if (currentPageIndex != ((Long) indexes.get(0)).longValue()) {
+if (currentPageIndex != (Long) indexes.get(0)) {
 %>=<%= (currentPageIndex - 1) * 10 
%>>Previous<%
 } else {
 %><%
 }
 for (Iterator it = indexes.iterator(); it.hasNext(); ) {
-long pageIdx = ((Long) it.next()).longValue();
+long pageIdx = (Long) it.next();
 if (pageIdx == currentPageIndex) {
 %><%= pageIdx + 1 %><%
 } else {



[jackrabbit-oak] branch trunk updated (6d56bccc0a -> 199b33dbe6)

2022-09-16 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 6d56bccc0a OAK-9902 : Configuration for ExternalUserValidator (#669)
 new 3aedc07afd OAK-9891:test case and fix for version of a node does not 
remove associated labels
 new f8324ac8c7 OAK-9891:refactored test case
 new c780645474 OAK-9891:incorporated review suggestions
 new 199b33dbe6 Merge pull request #688 from ArunOnCloud/trunk

The 18027 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../plugins/version/ReadWriteVersionManager.java   |  2 +-
 .../oak/jcr/version/VersionHistoryTest.java| 40 ++
 2 files changed, 41 insertions(+), 1 deletion(-)



[jackrabbit-oak] branch 1.22 updated: OAK-9535: Support recovery of large branch merge

2022-09-15 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/1.22 by this push:
 new eb9014c9fb OAK-9535: Support recovery of large branch merge
 new dfcc6f80be Merge pull request #701 from rishabhdaim/OAK-9933
eb9014c9fb is described below

commit eb9014c9fbe27bfa2f25d9852b63d0b67f23b070
Author: Marcel Reutegger 
AuthorDate: Mon Aug 30 16:42:21 2021 +0200

OAK-9535: Support recovery of large branch merge

Squashed commits by Stefan Egli and Marcel Reutegger
---
 .../oak/plugins/document/LastRevRecoveryAgent.java |  49 -
 .../plugins/document/LargeMergeRecoveryTest.java   | 238 +
 .../oak/plugins/document/RecoveryTest.java |  83 ++-
 3 files changed, 363 insertions(+), 7 deletions(-)

diff --git 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/LastRevRecoveryAgent.java
 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/LastRevRecoveryAgent.java
index 1f42e76067..e1f920f5e8 100644
--- 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/LastRevRecoveryAgent.java
+++ 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/LastRevRecoveryAgent.java
@@ -78,6 +78,14 @@ public class LastRevRecoveryAgent {
 
 private static final long LOGINTERVALMS = TimeUnit.MINUTES.toMillis(1);
 
+// OAK-9535 : create (flush) a pseudo branch commit journal entry as soon 
as
+// we see the (approximate) updateOp size of the recovery journal entry 
grow above 1 MB
+// (1 MB being well within the 16 MB limit to account for 'approximate' 
nature of getting the size)
+private static final int PSEUDO_BRANCH_COMMIT_UPDATE_OP_THRESHOLD_BYTES = 
1 * 1024 * 1024;
+
+// OAK-9535 : recalculate the journal entry size every 4096 elements
+private static final int PSEUDO_BRANCH_COMMIT_FLUSH_CHECK_COUNT = 4096;
+
 public LastRevRecoveryAgent(DocumentStore store,
 RevisionContext revisionContext,
 MissingLastRevSeeker seeker,
@@ -300,7 +308,7 @@ public class LastRevRecoveryAgent {
 
 //Map of known last rev of checked paths
 Map knownLastRevOrModification = 
MapFactory.getInstance().create();
-final JournalEntry changes = JOURNAL.newDocument(store);
+JournalEntry changes = JOURNAL.newDocument(store);
 
 Clock clock = revisionContext.getClock();
 
@@ -309,6 +317,8 @@ public class LastRevRecoveryAgent {
 long startOfScan = clock.getTime();
 long lastLog = startOfScan;
 
+final List pseudoBcRevs = new ArrayList<>();
+int nextFlushCheckCount = PSEUDO_BRANCH_COMMIT_FLUSH_CHECK_COUNT;
 for (NodeDocument doc : suspects) {
 totalCount++;
 lastCount++;
@@ -364,7 +374,41 @@ public class LastRevRecoveryAgent {
 unsavedParents.put(path, lastRevForParents);
 }
 }
+// avoid recalculating the size of the updateOp upon every single 
path
+// but also avoid doing it only after we hit the 16MB limit
+if (changes.getNumChangedNodes() >= nextFlushCheckCount) {
+final Revision pseudoBcRev = 
Revision.newRevision(clusterId).asBranchRevision();
+final UpdateOp pseudoBcUpdateOp = 
changes.asUpdateOp(pseudoBcRev);
+final int approxPseudoBcUpdateOpSize = 
pseudoBcUpdateOp.toString().length();
+if (approxPseudoBcUpdateOpSize >= 
PSEUDO_BRANCH_COMMIT_UPDATE_OP_THRESHOLD_BYTES) {
+// flush the (pseudo) journal entry
+// regarding 'pseudo' : this journal entry, while being a 
branch commit,
+// does not correspond to an actual branch commit that 
happened before the crash.
+// we might be able to in theory reconstruct the very 
original branch commits,
+// but that's a tedious job, and we were not doing that 
prior to OAK-9535 neither.
+// hence the optimization built-in here is that we create 
a journal entry
+// of type 'branch commit', but with a revision that is 
different from
+// what originally happened. Thx to the fact that the 
JournalEntry just
+// contains a list of branch commit journal ids, that 
should work fine.
+if (store.create(JOURNAL, 
singletonList(pseudoBcUpdateOp))) {
+log.info("recover : created intermediate pseudo-bc 
journal entry with rev {} and approx size {} bytes.",
+pseudoBcRev, approxPseudoBcUpdateOpSize);
+pseudoBcRevs.add(pseudoBcRev);
+changes = JOU

[jackrabbit-oak] branch trunk updated: OAK-9909 : added feature toggle for mongo document store throttling feature

2022-08-26 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 16dc91d163 OAK-9909 : added feature toggle for mongo document store 
throttling feature
 new 330f262db7 Merge pull request #678 from rishabhdaim/OAK-9909
16dc91d163 is described below

commit 16dc91d163c15e3c70b9da59ff2093854b655b81
Author: Rishabh Kumar 
AuthorDate: Fri Aug 26 15:42:17 2022 +0530

OAK-9909 : added feature toggle for mongo document store throttling feature
---
 .../oak/plugins/document/DocumentNodeStore.java|  3 +-
 .../plugins/document/DocumentNodeStoreBuilder.java | 11 +
 .../plugins/document/DocumentNodeStoreService.java | 12 +
 .../plugins/document/mongo/MongoDocumentStore.java |  3 +-
 .../oak/plugins/document/util/Utils.java   | 13 +
 .../plugins/document/DocumentNodeStoreTest.java| 55 ++
 .../mongo/MongoDocumentNodeStoreBuilderTest.java   | 13 +
 .../oak/plugins/document/util/UtilsTest.java   | 44 +
 .../org.mockito.plugins.MockMaker  | 16 +++
 9 files changed, 168 insertions(+), 2 deletions(-)

diff --git 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
index 1fefa82427..ddc3b60e69 100644
--- 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
+++ 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
@@ -38,6 +38,7 @@ import static 
org.apache.jackrabbit.oak.plugins.document.util.Utils.alignWithExt
 import static 
org.apache.jackrabbit.oak.plugins.document.util.Utils.getIdFromPath;
 import static 
org.apache.jackrabbit.oak.plugins.document.util.Utils.getModuleVersion;
 import static org.apache.jackrabbit.oak.plugins.document.util.Utils.pathToId;
+import static 
org.apache.jackrabbit.oak.plugins.document.util.Utils.isThrottlingEnabled;
 import static 
org.apache.jackrabbit.oak.spi.observation.ChangeSet.COMMIT_CONTEXT_OBSERVATION_CHANGESET;
 
 import java.io.Closeable;
@@ -597,7 +598,7 @@ public final class DocumentNodeStore
 }
 this.clusterId = clusterNodeInfo.getId();
 
-if (builder.isThrottlingEnabled()) {
+if (isThrottlingEnabled(builder)) {
 s = new ThrottlingDocumentStoreWrapper(s);
 }
 
diff --git 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.java
 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.java
index ac5bee6d39..818df4fc49 100644
--- 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.java
+++ 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.java
@@ -122,6 +122,7 @@ public class DocumentNodeStoreBuilder> {
 private LeaseCheckMode leaseCheck = 
ClusterNodeInfo.DEFAULT_LEASE_CHECK_MODE; // OAK-2739 is enabled by default 
also for non-osgi
 private boolean isReadOnlyMode = false;
 private Feature prefetchFeature;
+private Feature docStoreThrottlingFeature;
 private Weigher weigher = new EmpiricalWeigher();
 private long memoryCacheSize = DEFAULT_MEMORY_CACHE_SIZE;
 private int nodeCachePercentage = DEFAULT_NODE_CACHE_PERCENTAGE;
@@ -300,6 +301,16 @@ public class DocumentNodeStoreBuilder> {
 return prefetchFeature;
 }
 
+public T setDocStoreThrottlingFeature(@Nullable Feature 
docStoreThrottling) {
+this.docStoreThrottlingFeature = docStoreThrottling;
+return thisBuilder();
+}
+
+@Nullable
+public Feature getDocStoreThrottlingFeature() {
+return docStoreThrottlingFeature;
+}
+
 public T setLeaseFailureHandler(LeaseFailureHandler leaseFailureHandler) {
 this.leaseFailureHandler = leaseFailureHandler;
 return thisBuilder();
diff --git 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
index b10f947e33..3c06e35796 100644
--- 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
+++ 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
@@ -176,6 +176,11 @@ public class DocumentNodeStoreService {
  */
 private static final String FT_NAME_PREFETCH = "FT_PREFETCH_OAK-9780";
 
+/**
+ * Feature toggle name to enable document store throttling for Mongo 
Document Store
+ */
+private sta

[jackrabbit-oak] branch trunk updated (0859546a75 -> 41bcf5ad37)

2022-08-25 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 0859546a75 Merge pull request #677 from apache/OAK-9911-resource-leak
 new 5c1cc1307b OAK-9908: Recovery may revert committed changes
 new 8a603d5f4e OAK-9908: Recovery may revert committed changes
 new bec40e79fe Merge branch 'trunk' into OAK-9908-1
 new 41bcf5ad37 Merge pull request #675 from mreutegg/OAK-9908-1

The 17992 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../oak/plugins/document/LastRevRecoveryAgent.java |   8 ++
 .../plugins/document/NodeDocumentSweeperIT.java| 104 +++--
 2 files changed, 102 insertions(+), 10 deletions(-)



[jackrabbit-oak] branch trunk updated: OAK-9908: Recovery may revert committed changes

2022-08-22 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new f499f88fd8 OAK-9908: Recovery may revert committed changes
 new 46fe60c6ce Merge pull request #674 from mreutegg/OAK-9908
f499f88fd8 is described below

commit f499f88fd82eb3bdb916cd3d62acb21f7cbbe43b
Author: Marcel Reutegger 
AuthorDate: Mon Aug 22 14:54:52 2022 +0200

OAK-9908: Recovery may revert committed changes

Add ignored test
---
 .../plugins/document/NodeDocumentSweeperIT.java| 140 +
 1 file changed, 140 insertions(+)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/NodeDocumentSweeperIT.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/NodeDocumentSweeperIT.java
new file mode 100644
index 00..8048f19ea1
--- /dev/null
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/NodeDocumentSweeperIT.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.document;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore;
+import 
org.apache.jackrabbit.oak.plugins.document.mongo.MongoMissingLastRevSeeker;
+import org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore;
+import org.apache.jackrabbit.oak.plugins.document.rdb.RDBMissingLastRevSeeker;
+import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
+import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
+import org.jetbrains.annotations.NotNull;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static 
org.apache.jackrabbit.oak.plugins.document.TestUtils.disposeQuietly;
+import static org.apache.jackrabbit.oak.plugins.document.TestUtils.merge;
+import static org.junit.Assert.assertTrue;
+
+public class NodeDocumentSweeperIT extends AbstractTwoNodeTest {
+
+private static final Path TEST_PATH = Path.fromString("/foo/bar/baz");
+
+private FailingDocumentStore fds1;
+
+private LastRevRecoveryAgent agent2;
+
+public NodeDocumentSweeperIT(DocumentStoreFixture fixture) {
+super(fixture);
+}
+
+@Override
+protected DocumentStore customize(DocumentStore store) {
+if (fds1 == null) {
+fds1 = new FailingDocumentStore(store);
+return fds1;
+} else {
+return store;
+}
+}
+
+@Before
+public void prepareAgent() {
+// first setup seeker according to underlying document store 
implementation
+MissingLastRevSeeker seeker;
+if (store2 instanceof MongoDocumentStore) {
+seeker = new MongoMissingLastRevSeeker((MongoDocumentStore) 
store2, clock);
+} else if (store2 instanceof RDBDocumentStore) {
+seeker = new RDBMissingLastRevSeeker((RDBDocumentStore) store2, 
clock) {
+@Override
+public @NotNull Iterable getCandidates(long 
startTime) {
+List docs = new ArrayList<>();
+super.getCandidates(startTime).forEach(docs::add);
+docs.sort((o1, o2) -> 
NodeDocumentIdComparator.INSTANCE.compare(o1.getId(), o2.getId()));
+return docs;
+}
+};
+} else {
+// use default implementation
+seeker = new MissingLastRevSeeker(store2, clock);
+}
+// then customize seeker to return documents in a defined order
+// return docs sorted by decreasing depth
+MissingLastRevSeeker testSeeker = new MissingLastRevSeeker(store2, 
clock) {
+@Override
+public @NotNull Iterable getCandidates(long 
startTime) {
+List docs = new ArrayList<>();
+seeker.getCandidates(startTime).forEach(d

[jackrabbit-oak] branch trunk updated (f92d5c7656 -> 351f2a9aa8)

2022-08-22 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from f92d5c7656 Merge pull request #673 from apache/OAK-9879
 new 134994edd1 OAK-9851 : added support for throttling in mongo oak client 
based on oplog replication window
 new 14cfeec8a6 OAK-9851 : create exponential throttler to keep increasing 
the throttling as load increases
 new 13218240ec GRANITE-40204 : ignore throttling for ClusterNodes 
collection to allow lease updates with throttling
 new 8548f020c0 OAK-9851 : added static imports
 new 062cbaa3a8 OAK-9851 : made variables private
 new 8b7142f910 OAK-9851 : fixed config name in unit case
 new 9264d49bf8 OAK-9851 : changed config name to default_throttling_enabled
 new 7370ac236d OAK-9851 : fixed logic to log after every 10 seconds when 
throttling
 new ba92b70a10 OAK-9851 : fixed logic to skip extra logging
 new 3b6f2fb9c3 OAK-9851 : updated accessor name to reflect boolean type
 new 7b0d8edf6c OAK-9851 : added throttling feature to benchmarks
 new 840e01e4a3 OAK-9851 : make throttling metrics updater closeable and 
close this in mongodocstore
 new de993f9bd7 OAK-9851 : added test case for zero used size in oplog
 new 1bae3e7afd OAK-9851 : Used ExecutorCloser to close executorService
 new 351f2a9aa8 Merge pull request #635 from rishabhdaim/OAK-9851

The 17976 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 oak-benchmarks/README.md   |   2 +
 .../jackrabbit/oak/benchmark/BenchmarkOptions.java |   9 +
 .../jackrabbit/oak/benchmark/BenchmarkRunner.java  |  10 +-
 .../oak/scalability/ScalabilityOptions.java|   9 +
 .../oak/scalability/ScalabilityRunner.java |   9 +-
 .../oak/fixture/CompositeStoreFixture.java |   7 +-
 .../apache/jackrabbit/oak/fixture/OakFixture.java  |  54 +++--
 .../oak/fixture/OakRepositoryFixture.java  |  56 +++--
 .../apache/jackrabbit/oak/run/ServerCommand.java   |   6 +-
 .../oak/plugins/document/Configuration.java|   9 +
 .../oak/plugins/document/DocumentNodeStore.java|   5 +
 .../plugins/document/DocumentNodeStoreBuilder.java |  10 +
 .../plugins/document/DocumentNodeStoreService.java |   2 +
 .../oak/plugins/document/DocumentStore.java|  12 ++
 .../{LeaseCheckMode.java => Throttler.java}|  23 +--
 .../plugins/document/mongo/MongoDocumentStore.java |  76 ++-
 ...MongoDocumentStoreThrottlingMetricsUpdater.java | 123 +++
 .../document/mongo/MongoThrottlerFactory.java  |  95 +
 .../util/LeaseCheckDocumentStoreWrapper.java   |  12 ++
 .../document/util/LoggingDocumentStoreWrapper.java |  15 ++
 .../util/SynchronizingDocumentStoreWrapper.java|  12 ++
 .../util/ThrottlingDocumentStoreWrapper.java   | 229 +
 .../document/util/TimingDocumentStoreWrapper.java  |  19 ++
 .../DocumentNodeStoreServiceConfigurationTest.java |  10 +
 ...oDocumentStoreThrottlingMetricsUpdaterTest.java | 107 ++
 .../document/mongo/MongoThrottlerFactoryTest.java  | 113 ++
 .../util/ThrottlingDocumentStoreWrapperTest.java   | 102 +
 27 files changed, 1047 insertions(+), 89 deletions(-)
 copy 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/{LeaseCheckMode.java
 => Throttler.java} (64%)
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStoreThrottlingMetricsUpdater.java
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoThrottlerFactory.java
 create mode 100644 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/ThrottlingDocumentStoreWrapper.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStoreThrottlingMetricsUpdaterTest.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoThrottlerFactoryTest.java
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/util/ThrottlingDocumentStoreWrapperTest.java



[jackrabbit-oak] branch trunk updated (d7d74e5dd2 -> cb009e2d0e)

2022-08-08 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from d7d74e5dd2 Merge pull request #656 from mreutegg/OAK-9883-1
 new dc73b55a47 OAK-9850: ConcurrentPrefetchAndUpdateIT.cacheConsistency 
fails occasionally
 new db8f8ad74a Merge branch 'trunk' into OAK-9850-3
 new 5cc9e1df07 OAK-9850: ConcurrentPrefetchAndUpdateIT.cacheConsistency 
fails occasionally
 new f8cfead01d OAK-9850: ConcurrentPrefetchAndUpdateIT.cacheConsistency 
fails occasionally
 new cb009e2d0e Merge pull request #646 from mreutegg/OAK-9850-3

The 17937 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../plugins/document/cache/NodeDocumentCache.java  | 16 -
 .../plugins/document/mongo/MongoDocumentStore.java |  4 +-
 .../document/ConcurrentPrefetchAndUpdateIT.java|  2 -
 .../document/cache/NodeDocumentCacheTest.java  | 77 ++
 4 files changed, 93 insertions(+), 6 deletions(-)
 create mode 100644 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCacheTest.java



[jackrabbit-oak] branch trunk updated: OAK-9883: Add assertion to CacheWarmingTest

2022-08-08 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 29bf47000f OAK-9883: Add assertion to CacheWarmingTest
 new d7d74e5dd2 Merge pull request #656 from mreutegg/OAK-9883-1
29bf47000f is described below

commit 29bf47000f1c700b4c1f7d0fe8aaeb853709aaae
Author: Marcel Reutegger 
AuthorDate: Mon Aug 8 08:40:13 2022 +0200

OAK-9883: Add assertion to CacheWarmingTest

New assertion is not stable. Disable for now.
---
 .../jackrabbit/oak/plugins/document/prefetch/CacheWarmingTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/prefetch/CacheWarmingTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/prefetch/CacheWarmingTest.java
index 8f69b08fe4..d391c21fe2 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/prefetch/CacheWarmingTest.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/prefetch/CacheWarmingTest.java
@@ -209,7 +209,8 @@ public class CacheWarmingTest {
 int rawFindCalls = getRawFindCalls();
 logAndReset("read", cds, sw);
 if (prefetch) {
-assertThat(rawFindCalls, lessThan(10));
+// OAK-9883 - this assertion is not stable, disable for now
+// assertThat(rawFindCalls, lessThan(10));
 }
 }
 



[jackrabbit-oak] branch trunk updated: OAK-9826: Flaky test: DataStoreBlobStoreStatsTest

2022-08-08 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 00e5602b6f OAK-9826: Flaky test: DataStoreBlobStoreStatsTest
 new bcd78a78f6 Merge pull request #655 from mreutegg/OAK-9826
00e5602b6f is described below

commit 00e5602b6f77ee1210731630a8ffc7f90c12c580
Author: Marcel Reutegger 
AuthorDate: Fri Aug 5 17:27:30 2022 +0200

OAK-9826: Flaky test: DataStoreBlobStoreStatsTest

The statistics update interval is one second. Give the test a bit more time 
than that and increase maximum wait time to 1.5 seconds.
---
 .../oak/plugins/blob/datastore/DataStoreBlobStoreStatsTest.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStoreStatsTest.java
 
b/oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStoreStatsTest.java
index fb9379f731..f3df903c1d 100644
--- 
a/oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStoreStatsTest.java
+++ 
b/oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStoreStatsTest.java
@@ -964,7 +964,7 @@ public class DataStoreBlobStoreStatsTest {
 }
 
 private static  R waitForMetric(Function f, T input, R 
expected, R defaultValue) {
-return waitForMetric(f, input, expected, defaultValue, 100, 1000);
+return waitForMetric(f, input, expected, defaultValue, 100, 1500);
 }
 
 private static  R waitForMetric(Function f, T input, R 
expected, R defaultValue, int intervalMilliseconds, int waitMilliseconds) {
@@ -988,7 +988,7 @@ public class DataStoreBlobStoreStatsTest {
 }
 
 private static  Long waitForNonzeroMetric(Function f, T input) 
{
-return waitForNonzeroMetric(f, input, 100, 1000);
+return waitForNonzeroMetric(f, input, 100, 1500);
 }
 
 private static  Long waitForNonzeroMetric(Function f, T input, 
int intervalMilliseconds, int waitMilliseconds) {



[jackrabbit-oak] branch trunk updated (607ac0985e -> 8d950ecb5f)

2022-08-05 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 607ac0985e Merge pull request #637 from mreutegg/OAK-9854
 new 4b2733fa6f OAK-9883: Add assertion to CacheWarmingTest
 new f6a71650f8 OAK-9883: Add assertion to CacheWarmingTest
 new 8d950ecb5f Merge pull request #654 from mreutegg/OAK-9883

The 17928 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../document/prefetch/CacheWarmingTest.java| 24 +++---
 1 file changed, 21 insertions(+), 3 deletions(-)



[jackrabbit-oak] branch trunk updated: OAK-9854: Remove version information from Oak pages

2022-08-05 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new ce32e3bdd9 OAK-9854: Remove version information from Oak pages
 new 607ac0985e Merge pull request #637 from mreutegg/OAK-9854
ce32e3bdd9 is described below

commit ce32e3bdd9a7b00403bec3de633e42dc1e1c5a97
Author: Marcel Reutegger 
AuthorDate: Fri Jul 22 13:58:34 2022 +0200

OAK-9854: Remove version information from Oak pages
---
 oak-doc/src/site/site.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oak-doc/src/site/site.xml b/oak-doc/src/site/site.xml
index 49023faabd..921b123b44 100644
--- a/oak-doc/src/site/site.xml
+++ b/oak-doc/src/site/site.xml
@@ -23,7 +23,7 @@ under the License.
  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 
http://maven.apache.org/xsd/decoration-1.8.0.xsd;
  name="Jackrabbit Oak">
   
-  
+  
   
 
   https://jackrabbit.apache.org/"/>



[jackrabbit-oak] branch trunk updated: OAK-9879: CacheLIRS statistics may return incorrect load count

2022-08-04 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 0675eacffb OAK-9879: CacheLIRS statistics may return incorrect load 
count
 new 0b6233a530 Merge pull request #650 from mreutegg/OAK-9879
0675eacffb is described below

commit 0675eacffb0c7a1c198174cf2b6c10e55297c77f
Author: Marcel Reutegger 
AuthorDate: Thu Aug 4 16:12:22 2022 +0200

OAK-9879: CacheLIRS statistics may return incorrect load count

Add ignored test
---
 .../jackrabbit/oak/cache/ConcurrentTest.java   | 47 ++
 1 file changed, 47 insertions(+)

diff --git 
a/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/cache/ConcurrentTest.java
 
b/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/cache/ConcurrentTest.java
index f45d11052e..78c7aece41 100644
--- 
a/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/cache/ConcurrentTest.java
+++ 
b/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/cache/ConcurrentTest.java
@@ -18,17 +18,22 @@
  */
 package org.apache.jackrabbit.oak.cache;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Random;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -241,5 +246,47 @@ public class ConcurrentTest {
 throw ex[0];
 }
 }
+
+@Ignore("OAK-9879")
+@Test
+public void loadCount() throws Exception {
+for (int i = 0; i < 50; i++) {
+runLoadCountTest();
+}
+}
+
+private void runLoadCountTest() throws Exception {
+CacheLIRS cache =
+new CacheLIRS.Builder().
+segmentCount(1). // put everything in one segment
+maximumWeight(100).
+averageWeight(10).
+build();
+
+int numThreads = 8;
+CountDownLatch latch = new CountDownLatch(1);
+List threads = new ArrayList<>();
+for (int i = 0; i < numThreads; i++) {
+int v = i;
+threads.add(new Thread(() -> loadValue(cache, latch, v)));
+}
+threads.forEach(Thread::start);
+latch.countDown();
+for (Thread t : threads) {
+t.join();
+}
+assertEquals(numThreads, cache.stats().loadCount());
+}
+
+private void loadValue(CacheLIRS cache,
+   CountDownLatch latch,
+   int value) {
+try {
+latch.await();
+cache.get(value, () -> value);
+} catch (ExecutionException | InterruptedException e) {
+throw new RuntimeException(e);
+}
+}
 
 }



[jackrabbit-oak] branch trunk updated: OAK-9873: Prefetch node states: composite node store support

2022-08-04 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 9db1d37412 OAK-9873: Prefetch node states: composite node store support
 new 34f6b27228 Merge pull request #647 from mreutegg/OAK-9873
9db1d37412 is described below

commit 9db1d37412aacb94b85d61fdc6eed0244186937f
Author: Marcel Reutegger 
AuthorDate: Tue Aug 2 18:54:16 2022 +0200

OAK-9873: Prefetch node states: composite node store support
---
 oak-store-composite/pom.xml|  5 +
 .../oak/composite/CompositionContextTest.java  | 24 ++
 2 files changed, 29 insertions(+)

diff --git a/oak-store-composite/pom.xml b/oak-store-composite/pom.xml
index 9714f5282d..974e6248a7 100644
--- a/oak-store-composite/pom.xml
+++ b/oak-store-composite/pom.xml
@@ -160,6 +160,11 @@
   junit
   test
 
+
+  org.mockito
+  mockito-core
+  test
+
 
   org.slf4j
   jul-to-slf4j
diff --git 
a/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/CompositionContextTest.java
 
b/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/CompositionContextTest.java
index 763f290b85..0cc76c93bb 100644
--- 
a/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/CompositionContextTest.java
+++ 
b/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/CompositionContextTest.java
@@ -16,8 +16,12 @@
  */
 package org.apache.jackrabbit.oak.composite;
 
+import org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState;
 import org.apache.jackrabbit.oak.spi.mount.MountInfoProvider;
 import org.apache.jackrabbit.oak.spi.mount.Mounts;
+import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
+import org.apache.jackrabbit.oak.spi.state.PrefetchNodeStore;
 import org.junit.Test;
 
 import java.util.Arrays;
@@ -25,6 +29,11 @@ import java.util.Collections;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.same;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
 
 public class CompositionContextTest {
 
@@ -62,4 +71,19 @@ public class CompositionContextTest {
 assertFalse(ctx.shouldBeComposite("/jcr:system/rep:versionStorage"));
 }
 
+@Test
+public void prefetch() {
+MountInfoProvider mip = Mounts.newBuilder()
+.mount("libs","/libs")
+.build();
+MyStore ns = spy(MyStore.class);
+CompositionContext ctx = new CompositionContext(mip, ns, 
Collections.emptyList(), CompositeNodeStoreMonitor.EMPTY_INSTANCE, 
CompositeNodeStoreMonitor.EMPTY_INSTANCE);
+NodeState root = EmptyNodeState.EMPTY_NODE;
+ctx.prefetch(Collections.singletonList("/foo"), 
ctx.createRootNodeState(root));
+verify(ns, times(1)).prefetch(any(), same(root));
+}
+
+interface MyStore extends NodeStore, PrefetchNodeStore {
+}
+
 }



[jackrabbit-oak] branch trunk updated: OAK-9853: Generating site is broken

2022-07-22 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 03b95f8005 OAK-9853: Generating site is broken
03b95f8005 is described below

commit 03b95f8005302b7a739bc8ac7ad5808a3cd7e7f5
Author: Marcel Reutegger 
AuthorDate: Fri Jul 22 13:49:17 2022 +0200

OAK-9853: Generating site is broken
---
 .../site/markdown/security/authentication/external/defaultusersync.md   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/oak-doc/src/site/markdown/security/authentication/external/defaultusersync.md 
b/oak-doc/src/site/markdown/security/authentication/external/defaultusersync.md
index 3652b21381..8b5b145032 100644
--- 
a/oak-doc/src/site/markdown/security/authentication/external/defaultusersync.md
+++ 
b/oak-doc/src/site/markdown/security/authentication/external/defaultusersync.md
@@ -221,7 +221,7 @@ The `ExternalPrincipalConfiguration` defines the following 
configuration options
 | Name | Property  | Description   
   | Values  |
 
|--|---|--|-|
 | External Identity Protection | `protectExternalId`   | Enables 
protection of the system maintained `rep:externalId` properties | 
`true`,`false`|
-| External User and Group Protection | `protectExternalIdentities` | Enables 
protection of synchronized external users/groups accounts (since Oak 1.44.0). | 
`None`: no protection (default),`Warn`: log warnings,`Protected`: 
protection enabled |
+| External User and Group Protection | `protectExternalIdentities` | Enables 
protection of synchronized external users/groups accounts (since Oak 1.44.0). | 
`None`: no protection (default),`Warn`: log warnings,`Protected`: 
protection enabled |
 | System Principal Names   | `systemPrincipalNames`| Names of 
additional 'SystemUserPrincipal' instances that are excluded from the 
protection check (since Oak 1.44.0) | `true`,`false` |
 | | | |
 



[jackrabbit-oak] branch trunk updated: OAK-9850: ConcurrentPrefetchAndUpdateIT.cacheConsistency fails occasionally

2022-07-20 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new c981a2a9b3 OAK-9850: ConcurrentPrefetchAndUpdateIT.cacheConsistency 
fails occasionally
c981a2a9b3 is described below

commit c981a2a9b3b0dd0e6530107c40ce742c54d35033
Author: Marcel Reutegger 
AuthorDate: Wed Jul 20 09:34:04 2022 +0200

OAK-9850: ConcurrentPrefetchAndUpdateIT.cacheConsistency fails occasionally

Ignore test for now
---
 .../jackrabbit/oak/plugins/document/ConcurrentPrefetchAndUpdateIT.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentPrefetchAndUpdateIT.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentPrefetchAndUpdateIT.java
index a707a7712a..b6cc9c3b43 100755
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentPrefetchAndUpdateIT.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentPrefetchAndUpdateIT.java
@@ -33,6 +33,7 @@ import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.apache.jackrabbit.oak.plugins.document.Collection.NODES;
@@ -70,6 +71,7 @@ public class ConcurrentPrefetchAndUpdateIT extends 
AbstractMongoConnectionTest {
 System.clearProperty(DocumentNodeStore.SYS_PROP_PREFETCH);
 }
 
+@Ignore("OAK-9850")
 @Test
 public void cacheConsistency() throws Exception {
 Revision r = newRevision();



[jackrabbit-oak] branch trunk updated: OAK-9836: Release Oak 1.44.0

2022-07-15 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 34edee29cf OAK-9836: Release Oak 1.44.0
34edee29cf is described below

commit 34edee29cf65e44f18cc0548d176ab005de6dea6
Author: Marcel Reutegger 
AuthorDate: Fri Jul 15 17:17:25 2022 +0200

OAK-9836: Release Oak 1.44.0

Fix project version after release
---
 oak-doc-railroad-macro/pom.xml | 2 +-
 oak-doc/pom.xml| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/oak-doc-railroad-macro/pom.xml b/oak-doc-railroad-macro/pom.xml
index 0ada8c6677..8d2ab5c922 100644
--- a/oak-doc-railroad-macro/pom.xml
+++ b/oak-doc-railroad-macro/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.jackrabbit
 oak-parent
-1.43-SNAPSHOT
+1.45-SNAPSHOT
 ../oak-parent/pom.xml
 
 
diff --git a/oak-doc/pom.xml b/oak-doc/pom.xml
index e6972be8c7..1b2920639b 100644
--- a/oak-doc/pom.xml
+++ b/oak-doc/pom.xml
@@ -23,7 +23,7 @@
   
 org.apache.jackrabbit
 oak-parent
-1.43-SNAPSHOT
+1.45-SNAPSHOT
 ../oak-parent/pom.xml
   
 



[jackrabbit-oak] 01/01: Merge pull request #622 from apache/OAK-9780

2022-07-15 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit bbc141fd1fb9ff0d9ce742279445df9eb698c3e3
Merge: 799939d68a d005718e98
Author: Marcel Reutegger 
AuthorDate: Fri Jul 15 13:28:22 2022 +0200

Merge pull request #622 from apache/OAK-9780

OAK-9780: Prefetch node states

 .../oak/api/jmx/QueryEngineSettingsMBean.java  |  34 +-
 .../jackrabbit/oak/api/jmx/package-info.java   |   2 +-
 oak-core/pom.xml   |   3 +-
 .../main/java/org/apache/jackrabbit/oak/Oak.java   |  20 +
 .../apache/jackrabbit/oak/core/ImmutableRoot.java  |   7 +-
 .../apache/jackrabbit/oak/core/MutableRoot.java|  11 +-
 .../jackrabbit/oak/plugins/index/Cursors.java  | 559 -
 .../plugins/index/aggregate/AggregateIndex.java|   2 +-
 .../plugins/index/aggregate/AggregationCursor.java |   2 +-
 .../oak/plugins/index/cursor/AbstractCursor.java   |  22 +-
 .../oak/plugins/index/cursor/AncestorCursor.java   |  62 +++
 .../oak/plugins/index/cursor/ConcatCursor.java | 120 +
 .../oak/plugins/index/cursor/Cursors.java  | 113 +
 .../plugins/index/cursor/IntersectionCursor.java   | 121 +
 .../oak/plugins/index/cursor/PathCursor.java   |  73 +++
 .../oak/plugins/index/cursor/PrefetchCursor.java   | 203 
 .../oak/plugins/index/cursor/TraversingCursor.java | 192 +++
 .../oak/plugins/index/diffindex/DiffIndex.java |   2 +-
 .../oak/plugins/index/nodetype/NodeTypeIndex.java  |   3 +-
 .../plugins/index/property/PropertyIndexPlan.java  |   2 +-
 .../plugins/index/reference/ReferenceIndex.java|   2 +-
 .../jackrabbit/oak/query/ExecutionContext.java |  12 +-
 .../jackrabbit/oak/query/QueryEngineImpl.java  |   4 +-
 .../jackrabbit/oak/query/QueryEngineSettings.java  |  39 +-
 .../apache/jackrabbit/oak/query/QueryOptions.java  |  91 
 .../apache/jackrabbit/oak/query/SQL2Parser.java|  19 +-
 .../jackrabbit/oak/query/ast/SelectorImpl.java |  10 +-
 .../oak/query/index/TraversingIndex.java   |   2 +-
 .../jackrabbit/oak/query/stats/QueryRecorder.java  |   9 +-
 .../jackrabbit/oak/query/stats/QueryStatsData.java |   6 -
 .../jackrabbit/oak/query/xpath/Statement.java  |  10 +-
 .../oak/query/xpath/XPathToSQL2Converter.java  |  42 +-
 .../oak/plugins/index/cursor/CursorUtils.java  |  18 +-
 .../plugins/index/{ => cursor}/CursorsTest.java|   2 +-
 .../plugins/index/cursor/PrefetchCursorTest.java   | 119 +
 .../oak/plugins/index/cursor/TestCursor.java   |  25 +-
 .../index/cursor/TestPrefetchNodeStore.java|  26 +-
 .../oak/plugins/index/cursor/TestRow.java  |  29 +-
 .../plugins/index/nodetype/NodeTypeIndexTest.java  |   4 +-
 .../oak/security/CustomQueryIndexProviderTest.java |   2 +-
 .../site/markdown/nodestore/document/metrics.md|   2 +
 .../oak/plugins/index/lucene/LuceneIndex.java  |   4 +-
 oak-parent/pom.xml |   1 +
 .../index/search/spi/query/FulltextIndex.java  |   4 +-
 .../plugins/index/solr/query/SolrQueryIndex.java   |   4 +-
 .../oak/composite/CompositeNodeStore.java  |   9 +-
 .../oak/composite/CompositionContext.java  |   7 +
 .../jackrabbit/oak/composite/package-info.java |   2 +-
 .../oak/plugins/document/DocumentNodeState.java|  30 ++
 .../oak/plugins/document/DocumentNodeStore.java|  59 ++-
 .../plugins/document/DocumentNodeStoreBuilder.java |  12 +
 .../plugins/document/DocumentNodeStoreMBean.java   |   6 +-
 .../document/DocumentNodeStoreMBeanImpl.java   |   4 +
 .../plugins/document/DocumentNodeStoreService.java |  13 +
 .../oak/plugins/document/DocumentStore.java|   8 +
 .../oak/plugins/document/DocumentStoreStats.java   |  31 ++
 .../document/DocumentStoreStatsCollector.java  |  10 +
 .../plugins/document/DocumentStoreStatsMBean.java  |   4 +
 .../document/cache/CacheChangesTracker.java|   6 -
 .../plugins/document/cache/NodeDocumentCache.java  |  25 +-
 .../plugins/document/mongo/MongoDocumentStore.java |  93 
 .../plugins/document/prefetch/CacheWarming.java|  74 +++
 .../util/LeaseCheckDocumentStoreWrapper.java   |   7 +
 .../document/ConcurrentPrefetchAndUpdateIT.java| 157 ++
 .../plugins/document/CountingDocumentStore.java|   6 +
 .../document/DocumentNodeStoreMBeanTest.java   |  24 +
 .../document/cache/CacheChangesTrackerTest.java|   4 +-
 .../document/mongo/MongoTestCollection.java|   4 +-
 .../document/prefetch/CacheWarmingTest.java| 228 +
 .../document/prefetch/CountingMongoCollection.java | 134 +
 .../document/prefetch/CountingMongoDatabase.java   | 354 +
 .../oak/spi/state/PrefetchNodeStore.java   |  23 +-
 72 files changed, 2721 insertions(+), 652 deletions(-)



[jackrabbit-oak] branch trunk updated (799939d68a -> bbc141fd1f)

2022-07-15 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 799939d68a OAK-9834 : clarify node names of ACL nodes (#610)
 add ab5adf716b OAK-9535 related : trying to increase mvn memory
 add 8c5bb742c0 OAK-9535 related : cleanup of erroneously pushed change
 add 437439a501 Merge branch 'apache:trunk' into trunk
 add 01628989fc Merge branch 'apache:trunk' into trunk
 add 12896c5338 Merge branch 'apache:trunk' into trunk
 add 6a72fcce1c Merge branch 'apache:trunk' into trunk
 add c480532e0b OAK-9780 : rebased branch OAK-9780 to trunk, excluding 
oak-api
 add 7ae925c40b Merge pull request #585 from stefan-egli/OAK-9780-2
 add 880c2c017b OAK-9780 PoC for DocumentNodeStore cache warming - prefetch 
query results
 add 29a860f388 OAK-9791 : Missing check for restriction node being present
 add aa6a0292c5 OAK-9793 : AbstractRestrictionProvider: validation to 
respect aggregation for unsupported paths
 add 6052ef60e1 OAK-9795 : Best practices: explicitly discourage ac setup 
for anonymous
 add b7cb2c870b ElasticResultRowAsyncIterator should not limit result set 
to 10k results (#588)
 add b223fe9f8a OAK-9798 : Inconsistent handling of supported permissions 
in CompositePermissionProviderOr
 add f9b59f8c51 OAK-9757 : increased node name limit for mongo 4.2 version
 add b50a449c27 OAK-9757 : created new api in documentstore to get size 
limit for node name
 add dc05c5caf3 OAK-9757 : moved the node name length check to 
documentnodestate while creating/adding new node
 add 84313be749 OAK-9757 : removed mongoversion class to use serverversion 
and changed documentstore api name
 add 1d3287cad1 OAK-9757 : fixed mongo util errors
 add e277bfaf4e OAK-9757 : fixed issue where size limit would come wrong 
for version less than 4.2.0
 add 84aa93b680 OAK-9757 : move isNodeNameLong check to addNode api of 
commitbuilder
 add 3b09fe1731 OAK-9757 : removed un-necessary junit
 add a05a39f779 OAK-9757: increased node name limit for mongo 4.2 version
 add 22c6036043 OAK-9757 : increased node name limit for mongo 4.2 version
 add 35cd618797 OAK-9757 : created new api in documentstore to get size 
limit for node name
 add a77f57ec90 OAK-9757 : moved the node name length check to 
documentnodestate while creating/adding new node
 add 3bd2bea137 OAK-9757 : removed mongoversion class to use serverversion 
and changed documentstore api name
 add e415630591 OAK-9757 : fixed mongo util errors
 add bf6b24ab67 OAK-9757 : fixed issue where size limit would come wrong 
for version less than 4.2.0
 add 8387f17d04 OAK-9757 : move isNodeNameLong check to addNode api of 
commitbuilder
 add f54bb8abcf OAK-9757 : removed un-necessary junit
 add 9d42c1c33d OAK-9757 : used MongoStatus.isVersion api to check node 
name limit
 add 9d7022d594 Revert "OAK-9757 : used MongoStatus.isVersion api to check 
node name limit"
 add 3d29a082be OAK-9757 : Override DocumentStore.getNodeNameLimit in 
wrapper classes
 add e7c918005a releng: use newest maven-fluido-skin 1.11.0 (#591)
 add 92afadc45a OAK-9798 : fix import in CompositePermissionProviderOrTest. 
accidential use of 
sun.reflect.generics.reflectiveObjects.NotImplementedException
 add fc4c6841ad OAK-9804 Flaky unit test 
FlatFileStoreTest.resumePreviousUnfinishedDownload()
 add bc1c534515 OAK-9797: Direct access blob cache override breaks metrics 
and monitoring
 add 1fa19c93c2 OAK-9797: Direct access blob cache override breaks metrics 
and monito…
 add 2e2a2bd38b OAK-9797: Direct access blob cache override breaks metrics 
and monitoring
 add 5c252f868d OAK-9780 : rebased branch OAK-9780 to trunk, excluding 
oak-api
 add 8b7c3a7335 Revert "OAK-9780 PoC for DocumentNodeStore cache warming - 
prefetch query results"
 add 012c72bab6 Revert "Revert "OAK-9780 PoC for DocumentNodeStore cache 
warming - prefetch query results""
 add 143cd76fd1 Revert failed attempt to get changes from trunk into branch
 add 70a6625300 Merge changes from trunk using 'git merge origin/trunk'
 add 83b43c7dce OAK-9780: PoC for DocumentNodeStore cache warming
 add b7b413966f Merge remote-tracking branch 'origin/trunk' into OAK-9780
 add 859387c134 OAK-9780: PoC for DocumentNodeStore cache warming
 add 61384b8bc1 OAK-9780: PoC for DocumentNodeStore cache warming
 add 7def7d18c2 OAK-9780 PoC for DocumentNodeStore cache warming - support 
relative prefetch (WIP)
 add 89f8fe9cad OAK-9780 PoC for DocumentNodeStore cache warming - avoid 
unnecessary conversion
 add 13bb08f8d8 Merge remote-tracking branch 'origin/trunk' into OAK-9780
 add ddb1ef6b57 OAK-9780: PoC for DocumentNodeStore cache warming
 add a6ed7b1a2c OAK-9780: PoC for DocumentNodeStore cache w

[jackrabbit-oak] branch OAK-9780 updated (3086a9eab9 -> d005718e98)

2022-07-14 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-9780
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 3086a9eab9 OAK-9780: Prefetch node states
 add d73db4ec3e OAK-9780: Prefetch node states
 add d005718e98 OAK-9780: Prefetch node states

No new revisions were added by this update.

Summary of changes:
 .../oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java | 2 +-
 .../jackrabbit/oak/plugins/document/DocumentNodeStoreMBeanTest.java   | 4 
 2 files changed, 1 insertion(+), 5 deletions(-)



[jackrabbit-oak] branch OAK-9780 updated (6129c0947f -> 3086a9eab9)

2022-07-14 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-9780
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 6129c0947f OAK-9780: Prefetch node states
 add 3086a9eab9 OAK-9780: Prefetch node states

No new revisions were added by this update.

Summary of changes:
 oak-doc/src/site/markdown/nodestore/document/metrics.md | 2 ++
 1 file changed, 2 insertions(+)



[jackrabbit-oak] branch OAK-9780 updated (754d9fc1c2 -> 6129c0947f)

2022-07-14 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-9780
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 754d9fc1c2 OAK-9780: Prefetch node states
 add 6129c0947f OAK-9780: Prefetch node states

No new revisions were added by this update.

Summary of changes:
 .../plugins/document/DocumentNodeStoreMBean.java   |  6 ++---
 .../document/DocumentNodeStoreMBeanImpl.java   |  4 +++-
 .../document/DocumentNodeStoreMBeanTest.java   | 28 ++
 3 files changed, 34 insertions(+), 4 deletions(-)



[jackrabbit-oak] branch OAK-9780 updated (f5978a6994 -> 754d9fc1c2)

2022-07-14 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-9780
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from f5978a6994 Merge branch 'trunk' into OAK-9780
 add 754d9fc1c2 OAK-9780: Prefetch node states

No new revisions were added by this update.

Summary of changes:
 oak-parent/pom.xml | 1 +
 1 file changed, 1 insertion(+)



[jackrabbit-oak] branch OAK-9780 updated (5f31e89530 -> f5978a6994)

2022-07-14 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to branch OAK-9780
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


from 5f31e89530 OAK-9780: PoC for DocumentNodeStore cache warming
 add 4e56cefc22 releng: Use m-fluido-skin 1.11.1
 add bc69e96915 OAK-9832: Update jacoco plugin to 0.8.8
 add 049e0b455e Merge pull request #618 from mreutegg/OAK-9832
 add d4594d9677 OAK-9831: Update spotbugs plugin to 4.7.1.0
 add f3b01d3135 Merge pull request #617 from mreutegg/OAK-9831
 add 70453b9dc9 OAK-9833: UpgradeIT fails on Java 17
 add e87ce865fb Merge pull request #619 from mreutegg/OAK-9833
 add a4287e179a OAK-9585: BrokenNetworkIT fails on Java 17
 add 12ec5c1eb9 Merge pull request #620 from mreutegg/OAK-9585
 add 1f1387d898 OAK-9817: Index stats logging indexing cycle failures after 
changes from OAK-9802 (#607)
 add b8de773521 OAK-9669: Update commons-io dependency to 2.11.0
 add 46864927ca Merge pull request #621 from mreutegg/OAK-9669
 add 3d737cc8b2 Fix typos in documentation
 add 37b1a39cc6 Merge branch 'apache:trunk' into OAK-9830
 add 2eea41155c Fix variable name
 add eed4b5ca92 Merge pull request #616 from nfsantos/OAK-9830
 add faacd0a6ad OAK-9836: Release Oak 1.44.0
 add 88823952df [maven-release-plugin] prepare release jackrabbit-oak-1.44.0
 add ef0fdac0e6 [maven-release-plugin] prepare for next development 
iteration
 add 9e613537c1 Merge branch 'trunk' of 
g...@github.com:apache/jackrabbit-oak.git into trunk
 add 799939d68a OAK-9834 : clarify node names of ACL nodes (#610)
 add f5978a6994 Merge branch 'trunk' into OAK-9780

No new revisions were added by this update.

Summary of changes:
 RELEASE-NOTES.txt  | 256 +
 oak-api/pom.xml|   2 +-
 oak-auth-external/pom.xml  |   2 +-
 oak-auth-ldap/pom.xml  |   2 +-
 oak-authorization-cug/pom.xml  |   2 +-
 oak-authorization-principalbased/pom.xml   |   2 +-
 oak-benchmarks-elastic/pom.xml |   2 +-
 oak-benchmarks-lucene/pom.xml  |   2 +-
 oak-benchmarks-solr/pom.xml|   2 +-
 oak-benchmarks/pom.xml |   2 +-
 oak-blob-cloud-azure/pom.xml   |   2 +-
 oak-blob-cloud/pom.xml |   2 +-
 oak-blob-plugins/pom.xml   |   2 +-
 oak-blob/pom.xml   |   2 +-
 oak-commons/pom.xml|   2 +-
 oak-core-spi/pom.xml   |   2 +-
 oak-core/pom.xml   |   2 +-
 .../oak/plugins/index/AsyncIndexUpdate.java|   8 +-
 .../apache/jackrabbit/oak/query/explain_result.txt |  11 +-
 .../org/apache/jackrabbit/oak/query/sql1.txt   |   8 +-
 .../apache/jackrabbit/oak/query/sql2-fulltext.txt  |  11 +-
 .../org/apache/jackrabbit/oak/query/sql2.txt   |  11 +-
 .../apache/jackrabbit/oak/query/sql2_explain.txt   |   8 +-
 .../org/apache/jackrabbit/oak/query/sql2_index.txt |   8 +-
 .../apache/jackrabbit/oak/query/sql2_measure.txt   |   8 +-
 .../apache/jackrabbit/oak/query/sql2_native.txt|   8 +-
 .../org/apache/jackrabbit/oak/query/xpath.txt  |   8 +-
 oak-doc/README.md  |   2 +-
 oak-doc/src/site/markdown/query/indexing.md|  18 +-
 oak-doc/src/site/markdown/query/lucene.md  |   8 +-
 .../markdown/security/accesscontrol/default.md |   5 +-
 oak-doc/src/site/site.xml  |   2 +-
 oak-examples/pom.xml   |   2 +-
 oak-examples/standalone/pom.xml|   2 +-
 oak-examples/webapp/pom.xml|   2 +-
 oak-exercise/pom.xml   |   2 +-
 oak-http/pom.xml   |   2 +-
 oak-it-osgi/pom.xml|   2 +-
 oak-it/pom.xml |   2 +-
 oak-jackrabbit-api/pom.xml |   2 +-
 oak-jcr/pom.xml|   2 +-
 oak-lucene/pom.xml |   2 +-
 oak-parent/pom.xml |   8 +-
 oak-pojosr/pom.xml |   2 +-
 oak-query-spi/pom.xml  |   2 +-
 .../jackrabbit/oak/spi/query/QueryIndex.java   |   4 +-
 oak-run-commons/pom.xml|   2 +-
 oak-run-elastic/pom.xml|   2 +-
 oak-run/pom.xml|   2 +-
 oak-search-elastic/pom.xml |   2 +-
 .../elastic/index/ElasticIndexEditorProvider.java  |  75 +-
 .../index/elastic/ElasticWriterDisabledTest.java   |  21 +-
 oak-search-mt/pom.xml

[jackrabbit-oak] branch OAK-9780 updated: OAK-9780: PoC for DocumentNodeStore cache warming

2022-07-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch OAK-9780
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/OAK-9780 by this push:
 new 5f31e89530 OAK-9780: PoC for DocumentNodeStore cache warming
5f31e89530 is described below

commit 5f31e895300d1d19ab2b2229bea16664b5410005
Author: Marcel Reutegger 
AuthorDate: Fri Jul 1 17:14:57 2022 +0200

OAK-9780: PoC for DocumentNodeStore cache warming

Clean up CacheChangesTracker
---
 .../document/cache/CacheChangesTracker.java|  6 --
 .../plugins/document/cache/NodeDocumentCache.java  | 25 +++---
 .../document/cache/CacheChangesTrackerTest.java|  4 ++--
 3 files changed, 15 insertions(+), 20 deletions(-)

diff --git 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/CacheChangesTracker.java
 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/CacheChangesTracker.java
index 559d33f034..862dffc385 100644
--- 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/CacheChangesTracker.java
+++ 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/CacheChangesTracker.java
@@ -47,12 +47,6 @@ public class CacheChangesTracker implements Closeable {
 changeTrackers.add(this);
 }
 
-public void putDocument(String key) {
-if (keyFilter.apply(key)) {
-lazyBloomFilter.put(key);
-}
-}
-
 public void invalidateDocument(String key) {
 if (keyFilter.apply(key)) {
 lazyBloomFilter.put(key);
diff --git 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCache.java
 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCache.java
index 78647cd0bf..95f147df6c 100644
--- 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCache.java
+++ 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCache.java
@@ -76,7 +76,7 @@ public class NodeDocumentCache implements Closeable {
 this.prevDocumentsCache = prevDocumentsCache;
 this.prevDocumentsCacheStats = prevDocumentsCacheStats;
 this.locks = locks;
-this.changeTrackers = new CopyOnWriteArrayList();
+this.changeTrackers = new CopyOnWriteArrayList<>();
 }
 
 /**
@@ -93,7 +93,7 @@ public class NodeDocumentCache implements Closeable {
 nodeDocumentsCache.invalidate(new StringValue(key));
 }
 
-internalMarkChanged(key);
+internalMarkChanged(key, null);
 } finally {
 lock.unlock();
 }
@@ -107,7 +107,7 @@ public class NodeDocumentCache implements Closeable {
 public void markChanged(@NotNull String key) {
 Lock lock = locks.acquire(key);
 try {
-internalMarkChanged(key);
+internalMarkChanged(key, null);
 } finally {
 lock.unlock();
 }
@@ -174,7 +174,7 @@ public class NodeDocumentCache implements Closeable {
 @Override
 public NodeDocument call() throws Exception {
 for (CacheChangesTracker tracker : changeTrackers) {
-tracker.putDocument(key);
+tracker.invalidateDocument(key);
 }
 return valueLoader.call();
 }
@@ -456,11 +456,17 @@ public class NodeDocumentCache implements Closeable {
 
 /**
  * Marks the document as potentially changed.
- * 
+ *
  * @param key the document to be marked
+ * @param trackerToSkip this tracker won't be updated. pass
+ * {@code null} to update all trackers.
  */
-private void internalMarkChanged(String key) {
+private void internalMarkChanged(@NotNull String key,
+ @Nullable CacheChangesTracker 
trackerToSkip) {
 for (CacheChangesTracker tracker : changeTrackers) {
+if (tracker == trackerToSkip) {
+continue;
+}
 tracker.invalidateDocument(key);
 }
 }
@@ -489,12 +495,7 @@ public class NodeDocumentCache implements Closeable {
 } else {
 nodeDocumentsCache.put(new StringValue(doc.getId()), doc);
 }
-for (CacheChangesTracker tracker : changeTrackers) {
-if (tracker == trackerToSkip) {
-continue;
-}
-tracker.putDocument(doc.getId());
-}
+internalMarkChanged(doc.getId(), trackerToSkip);
 }
 
 /**
diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/cache/CacheChangesTrackerTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document

[jackrabbit-oak] branch trunk updated: [maven-release-plugin] prepare for next development iteration

2022-07-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new ef0fdac0e6 [maven-release-plugin] prepare for next development 
iteration
ef0fdac0e6 is described below

commit ef0fdac0e65a26d91c24cb3a7d172acc4658f3ff
Author: Marcel Reutegger 
AuthorDate: Tue Jul 12 16:15:05 2022 +0200

[maven-release-plugin] prepare for next development iteration
---
 oak-api/pom.xml  | 2 +-
 oak-auth-external/pom.xml| 2 +-
 oak-auth-ldap/pom.xml| 2 +-
 oak-authorization-cug/pom.xml| 2 +-
 oak-authorization-principalbased/pom.xml | 2 +-
 oak-benchmarks-elastic/pom.xml   | 2 +-
 oak-benchmarks-lucene/pom.xml| 2 +-
 oak-benchmarks-solr/pom.xml  | 2 +-
 oak-benchmarks/pom.xml   | 2 +-
 oak-blob-cloud-azure/pom.xml | 2 +-
 oak-blob-cloud/pom.xml   | 2 +-
 oak-blob-plugins/pom.xml | 2 +-
 oak-blob/pom.xml | 2 +-
 oak-commons/pom.xml  | 2 +-
 oak-core-spi/pom.xml | 2 +-
 oak-core/pom.xml | 2 +-
 oak-examples/pom.xml | 2 +-
 oak-examples/standalone/pom.xml  | 2 +-
 oak-examples/webapp/pom.xml  | 2 +-
 oak-exercise/pom.xml | 2 +-
 oak-http/pom.xml | 2 +-
 oak-it-osgi/pom.xml  | 2 +-
 oak-it/pom.xml   | 2 +-
 oak-jackrabbit-api/pom.xml   | 2 +-
 oak-jcr/pom.xml  | 2 +-
 oak-lucene/pom.xml   | 2 +-
 oak-parent/pom.xml   | 6 +-
 oak-pojosr/pom.xml   | 2 +-
 oak-query-spi/pom.xml| 2 +-
 oak-run-commons/pom.xml  | 2 +-
 oak-run-elastic/pom.xml  | 2 +-
 oak-run/pom.xml  | 2 +-
 oak-search-elastic/pom.xml   | 2 +-
 oak-search-mt/pom.xml| 2 +-
 oak-search/pom.xml   | 2 +-
 oak-security-spi/pom.xml | 2 +-
 oak-segment-aws/pom.xml  | 2 +-
 oak-segment-azure/pom.xml| 2 +-
 oak-segment-remote/pom.xml   | 2 +-
 oak-segment-tar/pom.xml  | 2 +-
 oak-solr-core/pom.xml| 2 +-
 oak-solr-osgi/pom.xml| 2 +-
 oak-store-composite/pom.xml  | 2 +-
 oak-store-document/pom.xml   | 2 +-
 oak-store-spi/pom.xml| 2 +-
 oak-upgrade/pom.xml  | 2 +-
 pom.xml  | 4 ++--
 47 files changed, 48 insertions(+), 52 deletions(-)

diff --git a/oak-api/pom.xml b/oak-api/pom.xml
index 7ef5964292..6ec0f882b0 100644
--- a/oak-api/pom.xml
+++ b/oak-api/pom.xml
@@ -19,7 +19,7 @@
   
 org.apache.jackrabbit
 oak-parent
-1.44.0
+1.45-SNAPSHOT
 ../oak-parent/pom.xml
   
   4.0.0
diff --git a/oak-auth-external/pom.xml b/oak-auth-external/pom.xml
index 1a614fad9f..59f1e14395 100644
--- a/oak-auth-external/pom.xml
+++ b/oak-auth-external/pom.xml
@@ -23,7 +23,7 @@
 
 org.apache.jackrabbit
 oak-parent
-1.44.0
+1.45-SNAPSHOT
 ../oak-parent/pom.xml
 
 
diff --git a/oak-auth-ldap/pom.xml b/oak-auth-ldap/pom.xml
index 2f62b0fd28..d2bb16fa06 100644
--- a/oak-auth-ldap/pom.xml
+++ b/oak-auth-ldap/pom.xml
@@ -23,7 +23,7 @@
 
 org.apache.jackrabbit
 oak-parent
-1.44.0
+1.45-SNAPSHOT
 ../oak-parent/pom.xml
 
 
diff --git a/oak-authorization-cug/pom.xml b/oak-authorization-cug/pom.xml
index 47590bfe62..e4979e22a9 100644
--- a/oak-authorization-cug/pom.xml
+++ b/oak-authorization-cug/pom.xml
@@ -19,7 +19,7 @@
   
 org.apache.jackrabbit
 oak-parent
-1.44.0
+1.45-SNAPSHOT
 ../oak-parent/pom.xml
   
   4.0.0
diff --git a/oak-authorization-principalbased/pom.xml 
b/oak-authorization-principalbased/pom.xml
index e3174cd1e6..b4c2e785c1 100644
--- a/oak-authorization-principalbased/pom.xml
+++ b/oak-authorization-principalbased/pom.xml
@@ -19,7 +19,7 @@
 
 org.apache.jackrabbit
 oak-parent
-1.44.0
+1.45-SNAPSHOT
 ../oak-parent/pom.xml
 
 4.0.0
diff --git a/oak-benchmarks-elastic/pom.xml b/oak-benchmarks-elastic/pom.xml
index 1abd40c30c..a6a5d67ebc 100644
--- a/oak-benchmarks-elastic/pom.xml
+++ b/oak-benchmarks-elastic/pom.xml
@@ -20,7 +20,7 @@
 
 org.apache.jackrabbit
 oak-parent
-1.44.0
+1.45-SNAPSHOT
 ../oak-parent/pom.xml
 
 4.0.0
diff --git a/oak-benchmarks-lucene/pom.xml b/oak-benchmarks-lucene/pom.xml
index f25bc4f20f..c92cc6db51 100644
--- a/oak-benchmarks-lucene

[jackrabbit-oak] annotated tag jackrabbit-oak-1.44.0 created (now 5daabf2f5a)

2022-07-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a change to annotated tag jackrabbit-oak-1.44.0
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


  at 5daabf2f5a (tag)
 tagging 88823952df70ba4131481537596e334e3e8029f5 (commit)
  by Marcel Reutegger
  on Tue Jul 12 16:14:59 2022 +0200

- Log -
[maven-release-plugin] copy for tag jackrabbit-oak-1.44.0
---

No new revisions were added by this update.



[jackrabbit-oak] branch trunk updated: [maven-release-plugin] prepare release jackrabbit-oak-1.44.0

2022-07-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 88823952df [maven-release-plugin] prepare release jackrabbit-oak-1.44.0
88823952df is described below

commit 88823952df70ba4131481537596e334e3e8029f5
Author: Marcel Reutegger 
AuthorDate: Tue Jul 12 16:13:18 2022 +0200

[maven-release-plugin] prepare release jackrabbit-oak-1.44.0
---
 oak-api/pom.xml  | 2 +-
 oak-auth-external/pom.xml| 2 +-
 oak-auth-ldap/pom.xml| 2 +-
 oak-authorization-cug/pom.xml| 2 +-
 oak-authorization-principalbased/pom.xml | 2 +-
 oak-benchmarks-elastic/pom.xml   | 2 +-
 oak-benchmarks-lucene/pom.xml| 2 +-
 oak-benchmarks-solr/pom.xml  | 2 +-
 oak-benchmarks/pom.xml   | 2 +-
 oak-blob-cloud-azure/pom.xml | 2 +-
 oak-blob-cloud/pom.xml   | 2 +-
 oak-blob-plugins/pom.xml | 2 +-
 oak-blob/pom.xml | 2 +-
 oak-commons/pom.xml  | 2 +-
 oak-core-spi/pom.xml | 2 +-
 oak-core/pom.xml | 2 +-
 oak-examples/pom.xml | 2 +-
 oak-examples/standalone/pom.xml  | 2 +-
 oak-examples/webapp/pom.xml  | 2 +-
 oak-exercise/pom.xml | 2 +-
 oak-http/pom.xml | 2 +-
 oak-it-osgi/pom.xml  | 2 +-
 oak-it/pom.xml   | 2 +-
 oak-jackrabbit-api/pom.xml   | 2 +-
 oak-jcr/pom.xml  | 2 +-
 oak-lucene/pom.xml   | 2 +-
 oak-parent/pom.xml   | 6 +-
 oak-pojosr/pom.xml   | 2 +-
 oak-query-spi/pom.xml| 2 +-
 oak-run-commons/pom.xml  | 2 +-
 oak-run-elastic/pom.xml  | 2 +-
 oak-run/pom.xml  | 2 +-
 oak-search-elastic/pom.xml   | 2 +-
 oak-search-mt/pom.xml| 2 +-
 oak-search/pom.xml   | 2 +-
 oak-security-spi/pom.xml | 2 +-
 oak-segment-aws/pom.xml  | 2 +-
 oak-segment-azure/pom.xml| 2 +-
 oak-segment-remote/pom.xml   | 2 +-
 oak-segment-tar/pom.xml  | 2 +-
 oak-solr-core/pom.xml| 2 +-
 oak-solr-osgi/pom.xml| 2 +-
 oak-store-composite/pom.xml  | 2 +-
 oak-store-document/pom.xml   | 2 +-
 oak-store-spi/pom.xml| 2 +-
 oak-upgrade/pom.xml  | 2 +-
 pom.xml  | 4 ++--
 47 files changed, 52 insertions(+), 48 deletions(-)

diff --git a/oak-api/pom.xml b/oak-api/pom.xml
index a6ab998ee8..7ef5964292 100644
--- a/oak-api/pom.xml
+++ b/oak-api/pom.xml
@@ -19,7 +19,7 @@
   
 org.apache.jackrabbit
 oak-parent
-1.43-SNAPSHOT
+1.44.0
 ../oak-parent/pom.xml
   
   4.0.0
diff --git a/oak-auth-external/pom.xml b/oak-auth-external/pom.xml
index 364f838a21..1a614fad9f 100644
--- a/oak-auth-external/pom.xml
+++ b/oak-auth-external/pom.xml
@@ -23,7 +23,7 @@
 
 org.apache.jackrabbit
 oak-parent
-1.43-SNAPSHOT
+1.44.0
 ../oak-parent/pom.xml
 
 
diff --git a/oak-auth-ldap/pom.xml b/oak-auth-ldap/pom.xml
index 5eaea36fb6..2f62b0fd28 100644
--- a/oak-auth-ldap/pom.xml
+++ b/oak-auth-ldap/pom.xml
@@ -23,7 +23,7 @@
 
 org.apache.jackrabbit
 oak-parent
-1.43-SNAPSHOT
+1.44.0
 ../oak-parent/pom.xml
 
 
diff --git a/oak-authorization-cug/pom.xml b/oak-authorization-cug/pom.xml
index 26838d969e..47590bfe62 100644
--- a/oak-authorization-cug/pom.xml
+++ b/oak-authorization-cug/pom.xml
@@ -19,7 +19,7 @@
   
 org.apache.jackrabbit
 oak-parent
-1.43-SNAPSHOT
+1.44.0
 ../oak-parent/pom.xml
   
   4.0.0
diff --git a/oak-authorization-principalbased/pom.xml 
b/oak-authorization-principalbased/pom.xml
index 94e4f1314e..e3174cd1e6 100644
--- a/oak-authorization-principalbased/pom.xml
+++ b/oak-authorization-principalbased/pom.xml
@@ -19,7 +19,7 @@
 
 org.apache.jackrabbit
 oak-parent
-1.43-SNAPSHOT
+1.44.0
 ../oak-parent/pom.xml
 
 4.0.0
diff --git a/oak-benchmarks-elastic/pom.xml b/oak-benchmarks-elastic/pom.xml
index 3fdd53e210..1abd40c30c 100644
--- a/oak-benchmarks-elastic/pom.xml
+++ b/oak-benchmarks-elastic/pom.xml
@@ -20,7 +20,7 @@
 
 org.apache.jackrabbit
 oak-parent
-1.43-SNAPSHOT
+1.44.0
 ../oak-parent/pom.xml
 
 4.0.0
diff --git a/oak-benchmarks-lucene/pom.xml b/oak-benchmarks-lucene/pom.xml
index 5f465cc1b9..f25bc4f20f 100644
--- a/oak-benchmarks-lucene

[jackrabbit-oak] branch trunk updated: OAK-9836: Release Oak 1.44.0

2022-07-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new faacd0a6ad OAK-9836: Release Oak 1.44.0
faacd0a6ad is described below

commit faacd0a6ad572fc856a80cb7b92810715ccc1abf
Author: Marcel Reutegger 
AuthorDate: Tue Jul 12 14:45:07 2022 +0200

OAK-9836: Release Oak 1.44.0

Prepare release notes
---
 RELEASE-NOTES.txt | 256 +++---
 1 file changed, 109 insertions(+), 147 deletions(-)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index c49aea92f3..da22c85bfb 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,4 +1,4 @@
-Release Notes -- Apache Jackrabbit Oak -- Version 1.42.0
+Release Notes -- Apache Jackrabbit Oak -- Version 1.44.0
 
 Introduction
 
@@ -7,176 +7,138 @@ Jackrabbit Oak is a scalable, high-performance hierarchical 
content
 repository designed for use as the foundation of modern world-class
 web sites and other demanding content applications.
 
-Apache Jackrabbit Oak 1.42.0 is an incremental feature release based
+Apache Jackrabbit Oak 1.44.0 is an incremental feature release based
 on and compatible with earlier stable Jackrabbit Oak 1.x
 releases. This release is considered stable and targeted for
 production use.
 
-While Oak 1.42.0 compiles and tests successfully on Java 15, Javadocs
-generation fails on Java 15 (but works as expected on Java 8).
+While Oak 1.44.0 compiles and tests successfully on Java 17, Javadocs
+generation fails on Java 17 (but works as expected on Java 8).
 
 The Oak effort is a part of the Apache Jackrabbit project.
 Apache Jackrabbit is a project of the Apache Software Foundation.
 
-Changes in Oak 1.42.0
+Changes in Oak 1.44.0
 -
 
 Technical task
 
-[OAK-9470] - Move AutoMembershipPrincipals from 
ExternalGroupPrincipalProvider to top level
-[OAK-9475] - Document DynamicMembershipProvider
-[OAK-9574] - Update Mockito dependency to 3.12.4
-[OAK-9577] - Update Tomcat dependency to 8.5.71
-[OAK-9579] - standalone: upgrade spring fwk to 2.5.5
+[OAK-9585] - BrokenNetworkIT fails on Java 17
+[OAK-9703] - benchmarks comparing new restrictions to rep:glob
+[OAK-9833] - UpgradeIT fails on Java 17
 
 Bug
 
-[OAK-8440] - Test failure: SegmentWriteQueueTest.testFlush()
-[OAK-9141] - Test failure: 
ElasticFullTextAsyncTest.testNoStoredIndexDefinition
-[OAK-9262] - Incorrect session counter metric on concurrent logout
-[OAK-9449] - Any new (elastic) index def added after Out of the band 
reindexing will trigger reindexing when the async cycle will run the first 
index update
-[OAK-9453] - Segment copy test failures after Azure compaction changes
-[OAK-9454] - Improve nodeScopeIndex related documentation to mention a 
larger index size in case of using this property
-[OAK-9456] - Exclude all possible PSD mime types in default tika config
-[OAK-9457] - Lucene index is always used over ES index when the cost is 
minimal
-[OAK-9464] - Suggestion Results are not deduplicated when ES indexes are 
used
-[OAK-9465] - [Index Management] Versioned elastic index will get ignored 
during query execution
-[OAK-9469] - Unsuccessful lease refresh in AzureRepositoryLock can cause 
two processes using Oak to have write access
-[OAK-9471] - Query for split documents by Revision GC times out
-[OAK-9476] - Clock difference check performed too late
-[OAK-9477] - Time difference warning too sensitive
-[OAK-9483] - UpgradeIT fails when noexec is set on temp folder
-[OAK-9484] - PersistentRedisCacheTest fails when noexec is set on temp 
folder
-[OAK-9487] - WarnLogStringPropertySizeTest may fail with multiple fixtures
-[OAK-9496] - oak-solr-osgi embeds vulnerable Apache ZooKeeper
-[OAK-9497] - LargeLdapProviderTest: InvocationTargetException: LDAP 
connection has been closed
-[OAK-9502] - ElasticSimilarQueryTest.vectorSimilarityLargeData fails 
intermittently on ASF Jenkins
-[OAK-9512] - PrefixPattern.matches(String) always returns false
-[OAK-9513] - PrefixPattern ignores empty namespace perfix
-[OAK-9519] - TlsGuardingConnection doesn't do a TLS handshake on reused 
connections
-[OAK-9520] - CVE-2021-29262 in oak-solr-osgi
-[OAK-9529] - Log message "Another copy of the index update is already 
running" should be info
-[OAK-9535] - Support recovery of large branch merge
-[OAK-9537] - Security vulnerability in 
org/apache/lucene/queryparser/xml/CoreParser.java
-[OAK-9541] - ItemExistsException: "Node with the same UUID exists" thrown 
during SysView import with existing different UUID
-[OAK-9555] - javadoc error due to bracket mismatch
-[OAK-9560] - Javadoc build fails if using Java11
-[OAK-9562] - Missing _bin when nod

[jackrabbit-oak] branch trunk updated: OAK-9669: Update commons-io dependency to 2.11.0

2022-07-12 Thread mreutegg
This is an automated email from the ASF dual-hosted git repository.

mreutegg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
 new b8de773521 OAK-9669: Update commons-io dependency to 2.11.0
 new 46864927ca Merge pull request #621 from mreutegg/OAK-9669
b8de773521 is described below

commit b8de7735219d6efc4a08e0d77ed3f57e4fa1b8cc
Author: Marcel Reutegger 
AuthorDate: Tue Jul 12 08:27:02 2022 +0200

OAK-9669: Update commons-io dependency to 2.11.0
---
 oak-parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oak-parent/pom.xml b/oak-parent/pom.xml
index 50245c4723..5778279d58 100644
--- a/oak-parent/pom.xml
+++ b/oak-parent/pom.xml
@@ -656,7 +656,7 @@
   
 commons-io
 commons-io
-2.6
+2.11.0
   
   
 commons-codec



  1   2   3   4   5   6   7   8   9   10   >