You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by da...@apache.org on 2023/06/26 14:26:01 UTC

[jackrabbit-oak] branch OAK-10199 updated (07548dddfb -> d8ed2a53ce)

This is an automated email from the ASF dual-hosted git repository.

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


    from 07548dddfb OAK-10199 : added test case to continue with GC even if there is crash
     new 80ed5235fa OAK-5782: Test failure: persistentCache.BroadcastTest.broadcastTCP
     new 61cdb568b8 OAK-10316: Importer exceptions always should mention path (#1001)
     new a7d7e98241 OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)
     new ac92820ac8 OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)
     new bbabbf8944 OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)
     new a11707669e OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)
     new f01d696555 OAK-10326: temporarily set baseline version explicitly (and remove before release of 1.54.0)
     new 96c3fa25d8 OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)
     new d8ed2a53ce OAK-10199 : handled escaped properties while deleting them

The 9 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-auth-external/pom.xml                          |  7 +++
 oak-authorization-cug/pom.xml                      |  7 +++
 oak-authorization-principalbased/pom.xml           |  7 +++
 oak-jcr/pom.xml                                    |  7 +++
 .../jackrabbit/oak/jcr/xml/ImporterImpl.java       |  4 +-
 oak-lucene/pom.xml                                 |  7 +++
 oak-parent/pom.xml                                 |  2 +
 oak-search/pom.xml                                 |  6 ++-
 oak-segment-tar/pom.xml                            |  7 +++
 oak-store-document/pom.xml                         |  7 +++
 .../plugins/document/VersionGarbageCollector.java  |  2 +
 .../document/VersionGarbageCollectorIT.java        | 57 +++++++++++++++++++++-
 .../document/persistentCache/BroadcastTest.java    |  1 +
 oak-store-spi/pom.xml                              |  5 ++
 14 files changed, 122 insertions(+), 4 deletions(-)


[jackrabbit-oak] 08/09: OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 96c3fa25d82724730e5d96ec0af8b842fc637901
Author: Julian Reschke <re...@apache.org>
AuthorDate: Fri Jun 23 09:27:17 2023 +0100

    OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)
---
 oak-search/pom.xml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/oak-search/pom.xml b/oak-search/pom.xml
index 74b3ebf7ea..0705670f92 100644
--- a/oak-search/pom.xml
+++ b/oak-search/pom.xml
@@ -199,7 +199,11 @@
             <artifactId>logback-classic</artifactId>
             <scope>test</scope>
         </dependency>
-
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
 


[jackrabbit-oak] 04/09: OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ac92820ac8cdb543d29e2ce41180af6bfed8b5ff
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Thu Jun 22 15:15:16 2023 +0100

    OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)
---
 oak-segment-tar/pom.xml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/oak-segment-tar/pom.xml b/oak-segment-tar/pom.xml
index 2a3577f8a4..5f96e2a4d2 100644
--- a/oak-segment-tar/pom.xml
+++ b/oak-segment-tar/pom.xml
@@ -239,6 +239,13 @@
             <scope>provided</scope>
         </dependency>
 
+        <!-- General utility libraries -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
         <!-- Other dependencies -->
 
         <dependency>


[jackrabbit-oak] 06/09: OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a11707669e49f22cafe6a8d3f88abc78875c7aa6
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Thu Jun 22 16:16:37 2023 +0100

    OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)
---
 oak-store-spi/pom.xml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/oak-store-spi/pom.xml b/oak-store-spi/pom.xml
index 93cb80239e..02c60af701 100644
--- a/oak-store-spi/pom.xml
+++ b/oak-store-spi/pom.xml
@@ -113,6 +113,11 @@
     </dependency>
 
     <!-- General utility libraries -->
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <scope>provided</scope>
+    </dependency>
     <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>


[jackrabbit-oak] 09/09: OAK-10199 : handled escaped properties while deleting them

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d8ed2a53ce1e62bef3129240916dad60c4ec48fe
Author: Rishabh Kumar <di...@adobe.com>
AuthorDate: Mon Jun 26 19:55:41 2023 +0530

    OAK-10199 : handled escaped properties while deleting them
---
 .../plugins/document/VersionGarbageCollector.java  |  2 +
 .../document/VersionGarbageCollectorIT.java        | 57 +++++++++++++++++++++-
 2 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
index 9d918ee9a4..307315d5a8 100644
--- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
+++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
@@ -62,6 +62,7 @@ import static java.util.Objects.requireNonNull;
 import static java.util.Optional.ofNullable;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.stream.Collectors.joining;
+import static java.util.stream.Collectors.toSet;
 import static org.apache.jackrabbit.guava.common.base.StandardSystemProperty.LINE_SEPARATOR;
 import static org.apache.jackrabbit.guava.common.collect.Iterables.all;
 import static org.apache.jackrabbit.guava.common.collect.Iterators.partition;
@@ -834,6 +835,7 @@ public class VersionGarbageCollector {
 
                 final Set<String> retainPropSet = ofNullable(doc.getNodeAtRevision(nodeStore, headRevision, null))
                         .map(DocumentNodeState::getPropertyNames)
+                        .map(p -> p.stream().map(Utils::escapePropertyName).collect(toSet()))
                         .orElse(emptySet());
                 final int deletedPropsGCCount = properties.stream()
                         .filter(p -> !retainPropSet.contains(p))
diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java
index 031176ca33..ca00648244 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java
@@ -454,7 +454,7 @@ public class VersionGarbageCollectorIT {
         assertEquals(10, stats.deletedPropsGCCount);
     }
 
-    // Test when properties are not collected in one GC cycle
+    // Test properties are collected after system crash had happened
     @Test
     public void testGCDeletedProps_4() throws Exception {
         final FailingDocumentStore fds = new FailingDocumentStore(fixture.createDocumentStore(), 42) {
@@ -522,6 +522,61 @@ public class VersionGarbageCollectorIT {
 
     }
 
+    // Test when escaped properties are collected
+    @Test
+    public void testGCDeletedProps_5() throws Exception {
+        //1. Create nodes with properties
+        NodeBuilder b1 = store.getRoot().builder();
+
+        // Add property to node & save
+        for (int i = 0; i < 10; i++) {
+            b1.child("x").setProperty("test."+i, "t", STRING);
+        }
+        store.merge(b1, EmptyHook.INSTANCE, CommitInfo.EMPTY);
+
+        // enable the detailed gc flag
+        writeField(gc, "detailedGCEnabled", true, true);
+        long maxAge = 1; //hours
+        long delta = TimeUnit.MINUTES.toMillis(10);
+        //1. Go past GC age and check no GC done as nothing deleted
+        clock.waitUntil(Revision.getCurrentTimestamp() + maxAge);
+        VersionGCStats stats = gc.gc(maxAge, HOURS);
+        assertEquals(0, stats.deletedPropsGCCount);
+
+        //Remove property
+        NodeBuilder b2 = store.getRoot().builder();
+        for (int i = 0; i < 10; i++) {
+            b2.getChildNode("x").removeProperty("test."+i);
+        }
+        store.merge(b2, EmptyHook.INSTANCE, CommitInfo.EMPTY);
+
+        store.runBackgroundOperations();
+
+        //2. Check that a deleted property is not collected before maxAge
+        //Clock cannot move back (it moved forward in #1) so double the maxAge
+        clock.waitUntil(clock.getTime() + delta);
+        stats = gc.gc(maxAge*2, HOURS);
+        assertEquals(0, stats.deletedPropsGCCount);
+
+        //3. Check that deleted property does get collected post maxAge
+        clock.waitUntil(clock.getTime() + HOURS.toMillis(maxAge*2) + delta);
+
+        stats = gc.gc(maxAge*2, HOURS);
+        assertEquals(10, stats.deletedPropsGCCount);
+
+        //4. Check that a revived property (deleted and created again) does not get gc
+        NodeBuilder b4 = store.getRoot().builder();
+        for (int i = 0; i < 10; i++) {
+            b4.child("x").setProperty("test."+i, "t", STRING);
+        }
+        store.merge(b4, EmptyHook.INSTANCE, CommitInfo.EMPTY);
+
+        clock.waitUntil(clock.getTime() + HOURS.toMillis(maxAge*2) + delta);
+        stats = gc.gc(maxAge*2, HOURS);
+        assertEquals(0, stats.deletedPropsGCCount);
+
+    }
+
     // OAK-10199 END
     
     private void gcSplitDocsInternal(String subNodeName) throws Exception {


[jackrabbit-oak] 02/09: OAK-10316: Importer exceptions always should mention path (#1001)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 61cdb568b822c2186a30b13f9188e3d586b5a548
Author: Julian Reschke <re...@apache.org>
AuthorDate: Thu Jun 22 13:23:03 2023 +0200

    OAK-10316: Importer exceptions always should mention path (#1001)
---
 .../src/main/java/org/apache/jackrabbit/oak/jcr/xml/ImporterImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/ImporterImpl.java b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/ImporterImpl.java
index 22085f01b7..82914384df 100644
--- a/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/ImporterImpl.java
+++ b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/ImporterImpl.java
@@ -147,11 +147,11 @@ public class ImporterImpl implements Importer {
         VersionManagerImpl vMgr = wsp.internalGetVersionManager();
         NodeDelegate nd = new NodeDelegate(sd, importTargetTree); 
         if (!vMgr.isCheckedOut(nd)) {
-            throw new VersionException("Target node is checked in.");
+            throw new VersionException("Target node is checked in: " + absPath);
         }
         boolean hasLocking = sessionContext.getRepository().getDescriptorValue(Repository.OPTION_LOCKING_SUPPORTED).getBoolean();
         if (importTargetTree.getStatus() != Tree.Status.NEW && hasLocking && nd.isLocked()) {
-            throw new LockException("Target node is locked.");
+            throw new LockException("Target node is locked:" + absPath);
         }
         effectiveNodeTypeProvider = wsp.getNodeTypeManager();
         definitionProvider = wsp.getNodeTypeManager();


[jackrabbit-oak] 01/09: OAK-5782: Test failure: persistentCache.BroadcastTest.broadcastTCP

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 80ed5235fa887b14353fa92cd088df91294d456c
Author: Marcel Reutegger <ma...@gmail.com>
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] 03/09: OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a7d7e9824145aacef68ac23b070e20dd998c28c5
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Thu Jun 22 14:52:09 2023 +0100

    OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)
---
 oak-auth-external/pom.xml                | 7 +++++++
 oak-authorization-cug/pom.xml            | 7 +++++++
 oak-authorization-principalbased/pom.xml | 7 +++++++
 oak-jcr/pom.xml                          | 7 +++++++
 oak-lucene/pom.xml                       | 7 +++++++
 5 files changed, 35 insertions(+)

diff --git a/oak-auth-external/pom.xml b/oak-auth-external/pom.xml
index b03f0820fd..9c5b3def59 100644
--- a/oak-auth-external/pom.xml
+++ b/oak-auth-external/pom.xml
@@ -134,6 +134,13 @@
             <version>${project.version}</version>
         </dependency>
 
+        <!-- General utility libraries -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
         <!-- Logging -->
         <dependency>
             <groupId>org.slf4j</groupId>
diff --git a/oak-authorization-cug/pom.xml b/oak-authorization-cug/pom.xml
index a9371aa7a3..4321115db6 100644
--- a/oak-authorization-cug/pom.xml
+++ b/oak-authorization-cug/pom.xml
@@ -101,6 +101,13 @@
       <version>${jackrabbit.version}</version>
     </dependency>
 
+    <!-- General utility libraries -->
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
     <!-- Logging -->
     <dependency>
       <groupId>org.slf4j</groupId>
diff --git a/oak-authorization-principalbased/pom.xml b/oak-authorization-principalbased/pom.xml
index 235c8d83d4..db29754887 100644
--- a/oak-authorization-principalbased/pom.xml
+++ b/oak-authorization-principalbased/pom.xml
@@ -130,6 +130,13 @@
             <version>${jackrabbit.version}</version>
         </dependency>
 
+        <!-- General utility libraries -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
         <!-- Logging -->
         <dependency>
             <groupId>org.slf4j</groupId>
diff --git a/oak-jcr/pom.xml b/oak-jcr/pom.xml
index 4f01a48115..df196a49bd 100644
--- a/oak-jcr/pom.xml
+++ b/oak-jcr/pom.xml
@@ -373,6 +373,13 @@
       <artifactId>slf4j-api</artifactId>
     </dependency>
 
+    <!-- General utility libraries -->
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
     <!-- Nullability annotations -->
     <dependency>
       <groupId>org.jetbrains</groupId>
diff --git a/oak-lucene/pom.xml b/oak-lucene/pom.xml
index 10cd8d26ec..2a0eaefb20 100644
--- a/oak-lucene/pom.xml
+++ b/oak-lucene/pom.xml
@@ -217,6 +217,13 @@
       <version>${project.version}</version>
     </dependency>
 
+    <!-- General utility libraries -->
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
     <!-- Lucene dependencies -->
     <dependency>
       <groupId>org.apache.lucene</groupId>


[jackrabbit-oak] 05/09: OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bbabbf89444fbe38383fbf081c83b5373b926aa0
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Thu Jun 22 15:41:48 2023 +0100

    OAK-10307: re-add guava to several subprojects to re-enable isolated compilation (will be removed later on)
---
 oak-store-document/pom.xml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/oak-store-document/pom.xml b/oak-store-document/pom.xml
index 5dc86bfe0d..c681406338 100644
--- a/oak-store-document/pom.xml
+++ b/oak-store-document/pom.xml
@@ -194,6 +194,13 @@
       <version>${jackrabbit.version}</version>
     </dependency>
 
+    <!-- General utility libraries -->
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
     <!-- Logging -->
     <dependency>
       <groupId>org.slf4j</groupId>


[jackrabbit-oak] 07/09: OAK-10326: temporarily set baseline version explicitly (and remove before release of 1.54.0)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f01d696555a8d76a68239359b19e6e47fad7b918
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Fri Jun 23 08:21:32 2023 +0100

    OAK-10326: temporarily set baseline version explicitly (and remove before release of 1.54.0)
---
 oak-parent/pom.xml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/oak-parent/pom.xml b/oak-parent/pom.xml
index 2d282c8323..29c16cc1c5 100644
--- a/oak-parent/pom.xml
+++ b/oak-parent/pom.xml
@@ -183,6 +183,8 @@
               </goals>
               <phase>pre-integration-test</phase>
               <configuration>
+                <!-- see https://issues.apache.org/jira/browse/OAK-10326 -->
+                <comparisonVersion>1.52.0</comparisonVersion>
                 <logResults>false</logResults>
                 <failOnWarning>false</failOnWarning>
                 <failOnError>true</failOnError>