(jackrabbit-oak) branch OAK-10892 updated (b55d47db16 -> 5641af1107)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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


from b55d47db16 OAK-10892: Update (shaded) Guava to 33.2.1
 add e0cffef667 OAK-10893: standalone: remove RMI dependency (#1529)
 add 5577031ee7 OAK-10886: Update Oak trunk to Jackrabbit 2.22.0 (#1532)
 add 5641af1107 Merge branch 'trunk' into OAK-10892

No new revisions were added by this update.

Summary of changes:
 oak-examples/standalone/pom.xml | 5 -
 oak-parent/pom.xml  | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)



(jackrabbit-oak) branch OAK-10886 deleted (was cb83b63f1c)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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


 was cb83b63f1c OAK-10886: Update Oak trunk to Jackrabbit 2.22.0

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(jackrabbit-oak) branch trunk updated: OAK-10886: Update Oak trunk to Jackrabbit 2.22.0 (#1532)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

reschke 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 5577031ee7 OAK-10886: Update Oak trunk to Jackrabbit 2.22.0 (#1532)
5577031ee7 is described below

commit 5577031ee739165cacbb0dfb8344ac22b58cc32e
Author: Julian Reschke 
AuthorDate: Sat Jun 15 07:49:56 2024 +0200

OAK-10886: Update Oak trunk to Jackrabbit 2.22.0 (#1532)
---
 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 3d18047a50..f4c6ae927e 100644
--- a/oak-parent/pom.xml
+++ b/oak-parent/pom.xml
@@ -48,7 +48,7 @@
 
   ${project.build.sourceEncoding}
 
-2.20.16
+2.22.0
 127.0.0.1
 27017
 MongoMKDB



Re: [PR] OAK-10886: Update Oak trunk to Jackrabbit 2.22.0 [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke merged PR #1532:
URL: https://github.com/apache/jackrabbit-oak/pull/1532


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user Joscorbe (triggered by Joscorbe).

Head commit for run:
bfa618b0181cb4d8fa38ba1783e270c3c933e3e6 / José Andrés Cordero Benítez 

OAK-10891: disable flaky test 
BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode 
ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS (#1528)

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9514754347

With regards,
GitHub Actions via GitBox



[ANNOUNCE] Apache Jackrabbit 2.22.0 released

2024-06-14 Thread Julian Reschke

The Apache Jackrabbit community is pleased to announce the release of
Apache Jackrabbit 2.22.0. The release is available for download at:

 http://jackrabbit.apache.org/downloads.html

See the full release notes below for details about this release:



Release Notes -- Apache Jackrabbit -- Version 2.22.0

Introduction


This is Apache Jackrabbit(TM) 2.22.0, a fully compliant implementation 
of the

Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as
specified in the Java Specification Request 283 (JSR 283).

Apache Jackrabbit 2.22.0 is an incremental feature release based on
and compatible with earlier stable Jackrabbit 2.x releases. Jackrabbit
2.22.x releases are considered stable and targeted for production use.

The minimum Java version for this release is Java 11. See

  http://jackrabbit.apache.org/jcr/downloads.html

for maintenance versions that support earlier Java versions.


Changes in Jackrabbit 2.22.0


(as compared to 2.20.16)

Bug

[JCR-4808] - 'pedantic' profile should run integration tests
[JCR-4907] - Javadocs have incorrect copyright date

Improvement

[JCR-4578] - IndexMerger should log more debug informations about 
the internal IndexBuckets
[JCR-4785] - ChildNodeEntriesImpl requires access to removed 
AbstractLinkedList feature


Task

[JCR-4352] - Update lucene-core dependency to 3.6.2
[JCR-4516] - switch bundle comparisonVersion for 2.20.0
[JCR-4580] - switch bundle comparisonVersion for 2.20.1
[JCR-4602] - jackrabbit-core: remove unused commons-collections 
dependency

[JCR-4634] - Jackrabbit should build and test with Java 16
[JCR-4650] - set baseline comparisonVersion to latest stable (2.20.2)
[JCR-4695] - set baseline comparisonVersion to latest stable (2.20.3)
[JCR-4737] - set baseline comparisonVersion to latest stable (2.20.4)
[JCR-4771] - set baseline comparisonVersion to latest stable (2.20.5)
[JCR-4809] - set baseline comparisonVersion to latest stable (2.20.6)
[JCR-4867] - set baseline comparisonVersion to latest stable (2.20.7)
[JCR-4891] - set baseline comparisonVersion to latest stable (2.20.8)
[JCR-4902] - Update mockito dependency to 5.11.0
[JCR-4912] - set baseline comparisonVersion to latest stable (2.20.9)
[JCR-4914] - Update oak-jackrabbit-api.version.implemented in trunk 
to Oak 1.60.0

[JCR-4931] - set baseline comparisonVersion to latest stable (2.20.10)
[JCR-4938] - update remaining copies of XMLChar.java with latest 
version from Xerces

[JCR-4955] - set baseline comparisonVersion to latest stable (2.20.11)
[JCR-4969] - set baseline comparisonVersion to latest stable (2.20.12)
[JCR-4972] - Remove RMI support
[JCR-4977] - use 'beta' identifier for releases in unstable branch
[JCR-4989] - set baseline comparisonVersion to latest stable (2.20.13)
[JCR-5000] - update Apache parent pom to version 31
[JCR-5012] - set baseline comparisonVersion to latest stable (2.20.14)
[JCR-5018] - Bump up minimal Java version to 11
[JCR-5020] - jackrabbit-webapp: deprecate RMI support "for removal"
[JCR-5021] - jackrabbit-jcr-rmi: deprecate RMI support "for removal"
[JCR-5022] - Update derby dependency to 10.15.2.0
[JCR-5026] - standalone: remove remote repository support (RMI and 
JNDI)

[JCR-5027] - jackrabbit-webapp: remove RMI support
[JCR-5028] - jackrabbit-jcr-rmi: remove
[JCR-5034] - set baseline comparisonVersion to latest stable (2.20.15)
[JCR-5039] - Update oak-jackrabbit-api.version.used in trunk and 
2.20 to Oak 1.22.19

[JCR-5042] - jackrabbit-jcr-servlet: remove RMI support
[JCR-5044] - Update tomcat dependency to 9.0.87
[JCR-5045] - Update commons-io dependency to 2.16.0
[JCR-5046] - Update oak-jackrabbit-api.version.implemented in trunk 
to Oak 1.62.0

[JCR-5047] - Update to jacoco version 0.8.12
[JCR-5052] - Update commons-io dependency to 2.16.1
[JCR-5053] - Update commons-cli dependency to 1.7.0
[JCR-5054] - vfs-ext: update hadoop-hdfs-client dependency to 3.4.0
[JCR-5055] - update Apache parent pom to version 32
[JCR-5056] - Update maven-jar-plugin to 3.4.1
[JCR-5057] - Update pmd-plugin dependency to 3.22.0
[JCR-5058] - Update spotbugs-maven-plugin to 4.8.5.0
[JCR-5059] - set baseline comparisonVersion to latest stable (2.20.16)
[JCR-5060] - Update oak-jackrabbit-api.version.used in trunk and 
2.20 to Oak 1.22.20

[JCR-5063] - Update build-helper-maven-plugin to version 3.6.0
[JCR-5064] - Update mockito dependency to 5.12.0
[JCR-5068] - update aws java sdk version to 1.12.730
[JCR-5069] - Update commons-cli dependency to 1.8.0
[JCR-5070] - Update tomcat dependency to 9.0.89
[JCR-5071] - Update oak-jackrabbit-api.version.implemented in trunk 
to Oak 1.64.0



For more detailed information about all the changes in this and other
Jackrabbit releases, please see the 

[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user reschke (triggered by reschke).

Head commit for run:
cb83b63f1c36ae611f98606abeec7debf54e4cbe / Julian Reschke 

OAK-10886: Update Oak trunk to Jackrabbit 2.22.0

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9516221695

With regards,
GitHub Actions via GitBox



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user reschke (triggered by reschke).

Head commit for run:
e0cffef6674685d087bba8928cda8b3ea22f93c6 / Julian Reschke 
OAK-10893: standalone: remove RMI dependency (#1529)

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9516172748

With regards,
GitHub Actions via GitBox



[PR] OAK-10886: Update Oak trunk to Jackrabbit 2.22.0 [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke opened a new pull request, #1532:
URL: https://github.com/apache/jackrabbit-oak/pull/1532

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



(jackrabbit-oak) 01/01: OAK-10886: Update Oak trunk to Jackrabbit 2.22.0

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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

commit cb83b63f1c36ae611f98606abeec7debf54e4cbe
Author: Julian Reschke 
AuthorDate: Fri Jun 14 13:35:48 2024 +0100

OAK-10886: Update Oak trunk to Jackrabbit 2.22.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 3d18047a50..f4c6ae927e 100644
--- a/oak-parent/pom.xml
+++ b/oak-parent/pom.xml
@@ -48,7 +48,7 @@
 
   ${project.build.sourceEncoding}
 
-2.20.16
+2.22.0
 127.0.0.1
 27017
 MongoMKDB



(jackrabbit-oak) branch OAK-10886 created (now cb83b63f1c)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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


  at cb83b63f1c OAK-10886: Update Oak trunk to Jackrabbit 2.22.0

This branch includes the following new commits:

 new cb83b63f1c OAK-10886: Update Oak trunk to Jackrabbit 2.22.0

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-10893: standalone: remove RMI dependency (#1529)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

reschke 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 e0cffef667 OAK-10893: standalone: remove RMI dependency (#1529)
e0cffef667 is described below

commit e0cffef6674685d087bba8928cda8b3ea22f93c6
Author: Julian Reschke 
AuthorDate: Fri Jun 14 14:32:40 2024 +0200

OAK-10893: standalone: remove RMI dependency (#1529)
---
 oak-examples/standalone/pom.xml | 5 -
 1 file changed, 5 deletions(-)

diff --git a/oak-examples/standalone/pom.xml b/oak-examples/standalone/pom.xml
index 28a107d2f8..e2164e8fc7 100644
--- a/oak-examples/standalone/pom.xml
+++ b/oak-examples/standalone/pom.xml
@@ -159,11 +159,6 @@
   jackrabbit-jcr-servlet
   ${jackrabbit.version}
 
-
-  org.apache.jackrabbit
-  jackrabbit-jcr-rmi
-  ${jackrabbit.version}
-
 
   org.apache.jackrabbit
   oak-jcr



(jackrabbit-oak) branch OAK-10893 deleted (was 66c80b2e1a)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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


 was 66c80b2e1a OAK-10893: standalone: remove RMI dependency

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



Re: [PR] OAK-10893: standalone: remove RMI dependency [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke merged PR #1529:
URL: https://github.com/apache/jackrabbit-oak/pull/1529


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user reschke (triggered by reschke).

Head commit for run:
b55d47db16f43860b6215626c44430b7e9065985 / Julian Reschke 
OAK-10892: Update (shaded) Guava to 33.2.1

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9515813897

With regards,
GitHub Actions via GitBox



[PR] OAK-10892: Update (shaded) Guava to 33.2.1 [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke opened a new pull request, #1531:
URL: https://github.com/apache/jackrabbit-oak/pull/1531

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



(jackrabbit-oak) branch OAK-10892 created (now b55d47db16)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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


  at b55d47db16 OAK-10892: Update (shaded) Guava to 33.2.1

This branch includes the following new commits:

 new b55d47db16 OAK-10892: Update (shaded) Guava to 33.2.1

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-10892: Update (shaded) Guava to 33.2.1

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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

commit b55d47db16f43860b6215626c44430b7e9065985
Author: Julian Reschke 
AuthorDate: Fri Jun 14 13:04:10 2024 +0100

OAK-10892: Update (shaded) Guava to 33.2.1
---
 oak-shaded-guava/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/oak-shaded-guava/pom.xml b/oak-shaded-guava/pom.xml
index eea53b87f9..4289d75f94 100644
--- a/oak-shaded-guava/pom.xml
+++ b/oak-shaded-guava/pom.xml
@@ -28,8 +28,8 @@
   bundle
 
   
-33.2.0-jre
-33.2.0
+33.2.1-jre
+33.2.1
 org.apache.jackrabbit.guava
   
 



Re: [PR] OAK-10803 -- compress/uncompress property [jackrabbit-oak]

2024-06-14 Thread via GitHub


ionutzpi commented on code in PR #1526:
URL: https://github.com/apache/jackrabbit-oak/pull/1526#discussion_r1639713253


##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentPropertyState.java:
##
@@ -38,24 +44,66 @@
 import org.apache.jackrabbit.oak.plugins.memory.StringPropertyState;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 import org.jetbrains.annotations.NotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * PropertyState implementation with lazy parsing of the JSOP encoded value.
  */
 final class DocumentPropertyState implements PropertyState {
 
+private static final Logger LOG = 
LoggerFactory.getLogger(DocumentPropertyState.class);
+
 private final DocumentNodeStore store;
 
 private final String name;
 
 private final String value;
 
 private PropertyState parsed;
+private final byte[] compressedValue;
+private final Compression compression;
+
+private static final int DEFAULT_COMPRESSION_THRESHOLD = 
Integer.getInteger("oak.mongo.compressionThreshold", -1);
 
 DocumentPropertyState(DocumentNodeStore store, String name, String value) {
-this.store = store;
-this.name = name;
-this.value = value;
+this(store, name, value, Compression.GZIP);
+}
+
+DocumentPropertyState(DocumentNodeStore store, String name, String value, 
Compression compression) {
+if (DEFAULT_COMPRESSION_THRESHOLD == -1) {
+this.store = store;

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] OAK-10803 -- compress/uncompress property [jackrabbit-oak]

2024-06-14 Thread via GitHub


ionutzpi commented on code in PR #1526:
URL: https://github.com/apache/jackrabbit-oak/pull/1526#discussion_r1639707803


##
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentPropertyStateTest.java:
##
@@ -18,26 +18,43 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 
+import org.apache.commons.lang3.RandomStringUtils;
 import org.apache.jackrabbit.oak.api.Blob;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
+import org.apache.jackrabbit.oak.commons.Compression;
 import org.apache.jackrabbit.oak.spi.blob.BlobStore;
 import org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.*;
+import org.junit.runners.MethodSorters;
 
 import static org.apache.jackrabbit.guava.common.collect.Lists.newArrayList;
 import static org.apache.jackrabbit.guava.common.collect.Sets.newHashSet;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GH] (jackrabbit-oak): Workflow run "SonarCloud" is working again!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has succeeded.
Run started by GitHub user nfsantos (triggered by nfsantos).

Head commit for run:
1cd3e1cc06fbcee1e4e02e9dafa7432df017d35e / Nuno Santos 
Do not remove field with size estimation from NodeDocuments downloaded from 
Mongo

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9515616355

With regards,
GitHub Actions via GitBox



Re: [PR] OAK-10803 -- compress/uncompress property [jackrabbit-oak]

2024-06-14 Thread via GitHub


ionutzpi commented on code in PR #1526:
URL: https://github.com/apache/jackrabbit-oak/pull/1526#discussion_r1639707557


##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentPropertyState.java:
##
@@ -38,24 +44,66 @@
 import org.apache.jackrabbit.oak.plugins.memory.StringPropertyState;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 import org.jetbrains.annotations.NotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * PropertyState implementation with lazy parsing of the JSOP encoded value.
  */
 final class DocumentPropertyState implements PropertyState {
 
+private static final Logger LOG = 
LoggerFactory.getLogger(DocumentPropertyState.class);
+
 private final DocumentNodeStore store;
 
 private final String name;
 
 private final String value;
 
 private PropertyState parsed;
+private final byte[] compressedValue;
+private final Compression compression;
+
+private static final int DEFAULT_COMPRESSION_THRESHOLD = 
Integer.getInteger("oak.mongo.compressionThreshold", -1);

Review Comment:
   Done
   



##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentPropertyState.java:
##
@@ -38,24 +44,66 @@
 import org.apache.jackrabbit.oak.plugins.memory.StringPropertyState;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 import org.jetbrains.annotations.NotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * PropertyState implementation with lazy parsing of the JSOP encoded value.
  */
 final class DocumentPropertyState implements PropertyState {
 
+private static final Logger LOG = 
LoggerFactory.getLogger(DocumentPropertyState.class);
+
 private final DocumentNodeStore store;
 
 private final String name;
 
 private final String value;
 
 private PropertyState parsed;
+private final byte[] compressedValue;
+private final Compression compression;
+
+private static final int DEFAULT_COMPRESSION_THRESHOLD = 
Integer.getInteger("oak.mongo.compressionThreshold", -1);
 
 DocumentPropertyState(DocumentNodeStore store, String name, String value) {
-this.store = store;
-this.name = name;
-this.value = value;
+this(store, name, value, Compression.GZIP);
+}
+
+DocumentPropertyState(DocumentNodeStore store, String name, String value, 
Compression compression) {
+if (DEFAULT_COMPRESSION_THRESHOLD == -1) {
+this.store = store;
+this.name = name;
+this.value = value;
+this.compression = null;
+this.compressedValue = null;
+} else {
+this.store = store;
+this.name = name;
+this.compression = compression;
+
+int size = value.getBytes().length;

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] OAK-10889 - Indexing job: do not remove field with size estimation from NodeDocuments downloaded from Mongo [jackrabbit-oak]

2024-06-14 Thread via GitHub


nfsantos opened a new pull request, #1530:
URL: https://github.com/apache/jackrabbit-oak/pull/1530

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] OAK-10803 -- compress/uncompress property [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke commented on code in PR #1526:
URL: https://github.com/apache/jackrabbit-oak/pull/1526#discussion_r1639705992


##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentPropertyState.java:
##
@@ -38,24 +44,66 @@
 import org.apache.jackrabbit.oak.plugins.memory.StringPropertyState;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 import org.jetbrains.annotations.NotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * PropertyState implementation with lazy parsing of the JSOP encoded value.
  */
 final class DocumentPropertyState implements PropertyState {
 
+private static final Logger LOG = 
LoggerFactory.getLogger(DocumentPropertyState.class);
+
 private final DocumentNodeStore store;
 
 private final String name;
 
 private final String value;
 
 private PropertyState parsed;
+private final byte[] compressedValue;
+private final Compression compression;
+
+private static final int DEFAULT_COMPRESSION_THRESHOLD = 
Integer.getInteger("oak.mongo.compressionThreshold", -1);
 
 DocumentPropertyState(DocumentNodeStore store, String name, String value) {
-this.store = store;
-this.name = name;
-this.value = value;
+this(store, name, value, Compression.GZIP);
+}
+
+DocumentPropertyState(DocumentNodeStore store, String name, String value, 
Compression compression) {
+if (DEFAULT_COMPRESSION_THRESHOLD == -1) {
+this.store = store;

Review Comment:
   things that are the same should be moved out of the condition



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user reschke (triggered by reschke).

Head commit for run:
66c80b2e1a6f049d67aab9cdd76ee9f873d41aba / Julian Reschke 

OAK-10893: standalone: remove RMI dependency

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9515159839

With regards,
GitHub Actions via GitBox



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user Joscorbe (triggered by Joscorbe).

Head commit for run:
24e25ec1d028ca58501dc619780d0f5b2c7be3d6 / Jose Cordero 
OAK-10891: disable flaky test 
BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode 
ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9514702430

With regards,
GitHub Actions via GitBox



Re: [PR] OAK-10803 -- compress/uncompress property [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke commented on PR #1526:
URL: https://github.com/apache/jackrabbit-oak/pull/1526#issuecomment-2167814526

   I believe the main concern is that we don't know yet exactly why we are 
doing this. IMHO it would be better to first collect data on the size of the 
properties.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] OAK-10803 -- compress/uncompress property [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke commented on code in PR #1526:
URL: https://github.com/apache/jackrabbit-oak/pull/1526#discussion_r1639674435


##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentPropertyState.java:
##
@@ -38,24 +44,66 @@
 import org.apache.jackrabbit.oak.plugins.memory.StringPropertyState;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 import org.jetbrains.annotations.NotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * PropertyState implementation with lazy parsing of the JSOP encoded value.
  */
 final class DocumentPropertyState implements PropertyState {
 
+private static final Logger LOG = 
LoggerFactory.getLogger(DocumentPropertyState.class);
+
 private final DocumentNodeStore store;
 
 private final String name;
 
 private final String value;
 
 private PropertyState parsed;
+private final byte[] compressedValue;
+private final Compression compression;
+
+private static final int DEFAULT_COMPRESSION_THRESHOLD = 
Integer.getInteger("oak.mongo.compressionThreshold", -1);
 
 DocumentPropertyState(DocumentNodeStore store, String name, String value) {
-this.store = store;
-this.name = name;
-this.value = value;
+this(store, name, value, Compression.GZIP);
+}
+
+DocumentPropertyState(DocumentNodeStore store, String name, String value, 
Compression compression) {
+if (DEFAULT_COMPRESSION_THRESHOLD == -1) {
+this.store = store;
+this.name = name;
+this.value = value;
+this.compression = null;
+this.compressedValue = null;
+} else {
+this.store = store;
+this.name = name;
+this.compression = compression;
+
+int size = value.getBytes().length;

Review Comment:
   That serializes the String into a byte array, obtains the lenght, and then 
throws the byte array away.



##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentPropertyState.java:
##
@@ -38,24 +44,66 @@
 import org.apache.jackrabbit.oak.plugins.memory.StringPropertyState;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 import org.jetbrains.annotations.NotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * PropertyState implementation with lazy parsing of the JSOP encoded value.
  */
 final class DocumentPropertyState implements PropertyState {
 
+private static final Logger LOG = 
LoggerFactory.getLogger(DocumentPropertyState.class);
+
 private final DocumentNodeStore store;
 
 private final String name;
 
 private final String value;
 
 private PropertyState parsed;
+private final byte[] compressedValue;
+private final Compression compression;
+
+private static final int DEFAULT_COMPRESSION_THRESHOLD = 
Integer.getInteger("oak.mongo.compressionThreshold", -1);

Review Comment:
   please use SystemPropertySupplier



##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentPropertyState.java:
##
@@ -38,24 +44,66 @@
 import org.apache.jackrabbit.oak.plugins.memory.StringPropertyState;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 import org.jetbrains.annotations.NotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * PropertyState implementation with lazy parsing of the JSOP encoded value.
  */
 final class DocumentPropertyState implements PropertyState {
 
+private static final Logger LOG = 
LoggerFactory.getLogger(DocumentPropertyState.class);
+
 private final DocumentNodeStore store;
 
 private final String name;
 
 private final String value;
 
 private PropertyState parsed;
+private final byte[] compressedValue;
+private final Compression compression;
+
+private static final int DEFAULT_COMPRESSION_THRESHOLD = 
Integer.getInteger("oak.mongo.compressionThreshold", -1);
 
 DocumentPropertyState(DocumentNodeStore store, String name, String value) {
-this.store = store;
-this.name = name;
-this.value = value;
+this(store, name, value, Compression.GZIP);
+}
+
+DocumentPropertyState(DocumentNodeStore store, String name, String value, 
Compression compression) {
+if (DEFAULT_COMPRESSION_THRESHOLD == -1) {
+this.store = store;
+this.name = name;
+this.value = value;
+this.compression = null;
+this.compressedValue = null;
+} else {
+this.store = store;
+this.name = name;
+this.compression = compression;
+
+int size = value.getBytes().length;

Review Comment:
   (also it needs to specify the charset)



##
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentPropertyStateTest.java:
##
@@ -18,26 +18,43 @@
 
 import 

(jackrabbit-oak) branch OAK-10893 created (now 66c80b2e1a)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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


  at 66c80b2e1a OAK-10893: standalone: remove RMI dependency

This branch includes the following new commits:

 new 66c80b2e1a OAK-10893: standalone: remove RMI dependency

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.




[PR] OAK-10893: standalone: remove RMI dependency [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke opened a new pull request, #1529:
URL: https://github.com/apache/jackrabbit-oak/pull/1529

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



(jackrabbit-oak) 01/01: OAK-10893: standalone: remove RMI dependency

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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

commit 66c80b2e1a6f049d67aab9cdd76ee9f873d41aba
Author: Julian Reschke 
AuthorDate: Fri Jun 14 12:11:13 2024 +0100

OAK-10893: standalone: remove RMI dependency
---
 oak-examples/standalone/pom.xml | 5 -
 1 file changed, 5 deletions(-)

diff --git a/oak-examples/standalone/pom.xml b/oak-examples/standalone/pom.xml
index 28a107d2f8..e2164e8fc7 100644
--- a/oak-examples/standalone/pom.xml
+++ b/oak-examples/standalone/pom.xml
@@ -159,11 +159,6 @@
   jackrabbit-jcr-servlet
   ${jackrabbit.version}
 
-
-  org.apache.jackrabbit
-  jackrabbit-jcr-rmi
-  ${jackrabbit.version}
-
 
   org.apache.jackrabbit
   oak-jcr



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user reschke (triggered by reschke).

Head commit for run:
b2a6670f8b489476c1c238a82d529f8e74f12607 / Julian Reschke 

OAK-10887: webapp: remove RMI support

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9514550841

With regards,
GitHub Actions via GitBox



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user reschke (triggered by reschke).

Head commit for run:
b9b9eb0edb276908368cea52d2b6c6161ee66ea1 / Julian Reschke 
OAK-10887: webapp: remove RMI support (#1527)

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9514559829

With regards,
GitHub Actions via GitBox



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user reschke (triggered by reschke).

Head commit for run:
0b997de85c0c663fe98c20f5027c08ffcdc936fd / Julian Reschke 

Merge branch 'trunk' of github.com:apache/jackrabbit-oak into trunk

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9514842895

With regards,
GitHub Actions via GitBox



(jackrabbit-oak) branch trunk updated: OAK-10887: webapp: remove RMI support - cleanup pom

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

reschke 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 bc76186092 OAK-10887: webapp: remove RMI support - cleanup pom
 new 0b997de85c Merge branch 'trunk' of github.com:apache/jackrabbit-oak 
into trunk
bc76186092 is described below

commit bc76186092f1268818d3dcf041815eeb0861af6a
Author: Julian Reschke 
AuthorDate: Fri Jun 14 11:43:52 2024 +0100

OAK-10887: webapp: remove RMI support - cleanup pom
---
 oak-examples/webapp/pom.xml | 5 -
 1 file changed, 5 deletions(-)

diff --git a/oak-examples/webapp/pom.xml b/oak-examples/webapp/pom.xml
index 3c767a72a6..a4f0b98d7a 100644
--- a/oak-examples/webapp/pom.xml
+++ b/oak-examples/webapp/pom.xml
@@ -78,11 +78,6 @@
   jackrabbit-jcr-servlet
   ${jackrabbit.version}
 
-
-  org.apache.jackrabbit
-  jackrabbit-jcr-rmi
-  ${jackrabbit.version}
-
 
   org.apache.jackrabbit
   oak-jcr



Re: [PR] OAK-10891: disable flaky test BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS [jackrabbit-oak]

2024-06-14 Thread via GitHub


Joscorbe merged PR #1528:
URL: https://github.com/apache/jackrabbit-oak/pull/1528


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



(jackrabbit-oak) branch trunk updated: OAK-10891: disable flaky test BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS (#1528)

2024-06-14 Thread joscorbe
This is an automated email from the ASF dual-hosted git repository.

joscorbe 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 bfa618b018 OAK-10891: disable flaky test 
BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode 
ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS (#1528)
bfa618b018 is described below

commit bfa618b0181cb4d8fa38ba1783e270c3c933e3e6
Author: José Andrés Cordero Benítez 
AuthorDate: Fri Jun 14 12:36:19 2024 +0200

OAK-10891: disable flaky test 
BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode 
ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS (#1528)
---
 .../org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
index d0fe5a45aa..033ff3ff7c 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
@@ -241,6 +241,8 @@ public class BranchCommitGCTest {
 
 @Test
 public void testDeletedPropsAndUnmergedBC() throws Exception {
+assumeTrue(fullGcMode != 
FullGCMode.ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS);
+
 // create a node with property.
 NodeBuilder nb = store.getRoot().builder();
 nb.child("bar").setProperty("prop", "value");



[PR] OAK-10891: disable flaky test BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS [jackrabbit-oak]

2024-06-14 Thread via GitHub


Joscorbe opened a new pull request, #1528:
URL: https://github.com/apache/jackrabbit-oak/pull/1528

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



(jackrabbit-oak) branch OAK-10891 created (now 24e25ec1d0)

2024-06-14 Thread joscorbe
This is an automated email from the ASF dual-hosted git repository.

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


  at 24e25ec1d0 OAK-10891: disable flaky test 
BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode 
ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS

This branch includes the following new commits:

 new 24e25ec1d0 OAK-10891: disable flaky test 
BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode 
ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS

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.




Re: [PR] Issues/oak 10781 [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke commented on PR #1518:
URL: https://github.com/apache/jackrabbit-oak/pull/1518#issuecomment-2167737652

   when merging please make sure to squash and to have the JIRA ticket properly 
in the commit message


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GH] (jackrabbit-oak): Workflow run "SonarCloud" is working again!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has succeeded.
Run started by GitHub user t-rana (triggered by amit-jain).

Head commit for run:
4add0afe4b01269bba6290ce78bb7457a9ab3a46 / t-rana 
OAK-10781: close logger

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9498703558

With regards,
GitHub Actions via GitBox



(jackrabbit-oak) 01/01: OAK-10891: disable flaky test BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS

2024-06-14 Thread joscorbe
This is an automated email from the ASF dual-hosted git repository.

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

commit 24e25ec1d028ca58501dc619780d0f5b2c7be3d6
Author: Jose Cordero 
AuthorDate: Fri Jun 14 12:31:25 2024 +0200

OAK-10891: disable flaky test 
BranchCommitGCTest.testDeletedPropsAndUnmergedBCfor mode 
ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS
---
 .../org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
index d0fe5a45aa..033ff3ff7c 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
@@ -241,6 +241,8 @@ public class BranchCommitGCTest {
 
 @Test
 public void testDeletedPropsAndUnmergedBC() throws Exception {
+assumeTrue(fullGcMode != 
FullGCMode.ORPHANS_EMPTYPROPS_KEEP_ONE_ALL_PROPS);
+
 // create a node with property.
 NodeBuilder nb = store.getRoot().builder();
 nb.child("bar").setProperty("prop", "value");



(jackrabbit-oak) branch OAK-10887 deleted (was b2a6670f8b)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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


 was b2a6670f8b OAK-10887: webapp: remove RMI support

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(jackrabbit-oak) branch trunk updated: OAK-10887: webapp: remove RMI support (#1527)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

reschke 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 b9b9eb0edb OAK-10887: webapp: remove RMI support (#1527)
b9b9eb0edb is described below

commit b9b9eb0edb276908368cea52d2b6c6161ee66ea1
Author: Julian Reschke 
AuthorDate: Fri Jun 14 12:21:31 2024 +0200

OAK-10887: webapp: remove RMI support (#1527)
---
 .../apache/jackrabbit/j2ee/BootstrapConfig.java|  12 -
 .../java/org/apache/jackrabbit/j2ee/RMIConfig.java | 175 ---
 .../jackrabbit/j2ee/RepositoryAccessServlet.java   |  87 +-
 .../jackrabbit/j2ee/RepositoryStartupServlet.java  | 335 ++---
 4 files changed, 22 insertions(+), 587 deletions(-)

diff --git 
a/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java
 
b/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java
index ff2599f282..998ccd43ee 100644
--- 
a/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java
+++ 
b/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java
@@ -56,18 +56,14 @@ public class BootstrapConfig extends AbstractConfig {
 
 private JNDIConfig jndiConfig = new JNDIConfig(this);
 
-private RMIConfig rmiConfig = new RMIConfig(this);
-
 public void init(Properties props) throws ServletException {
 super.init(props);
 jndiConfig.init(props);
-rmiConfig.init(props);
 }
 
 public void init(ServletConfig ctx) throws ServletException {
 super.init(ctx);
 jndiConfig.init(ctx);
-rmiConfig.init(ctx);
 }
 
 public String getRepositoryHome() {
@@ -106,10 +102,6 @@ public class BootstrapConfig extends AbstractConfig {
 return jndiConfig;
 }
 
-public RMIConfig getRmiConfig() {
-return rmiConfig;
-}
-
 public boolean isShutdownOnTimeout() {
 return shutdownOnTimeout;
 }
@@ -137,7 +129,6 @@ public class BootstrapConfig extends AbstractConfig {
 public void validate() {
 valid = repositoryName != null;
 jndiConfig.validate();
-rmiConfig.validate();
 }
 
 
@@ -146,8 +137,5 @@ public class BootstrapConfig extends AbstractConfig {
 if (jndiConfig.isValid()) {
 jndiConfig.logInfos();
 }
-if (rmiConfig.isValid()) {
-rmiConfig.logInfos();
-}
 }
 }
\ No newline at end of file
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
deleted file mode 100644
index 84f98b0df3..00
--- 
a/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java
+++ /dev/null
@@ -1,175 +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.
- */
-package org.apache.jackrabbit.j2ee;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.rmi.registry.Registry;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-
-/**
- * The RMI config hold information about RMI connection details.
- *
- * It supports the following properties and init parameters:
- * 
- * +---++
- * | Property Name | Init-Param Name|
- * +---++
- * | rmi.enable| {rmi-port sepc.}   |
- * | rmi.host  | rmi-host   |
- * | rmi.port  | rmi-port   |
- * | rmi.name  | {repository name}  |
- * | rmi.url   | rmi-url|
- * +---++
- * 
- */
-public class RMIConfig extends AbstractConfig {
-
-/**
- * default logger
- */
-private static final Logger log = LoggerFactory.getLogger(RMIConfig.class);
-
-private boolean rmiEnabled;
-
-private int rmiPort = -1;
-
-private String rmiHost;
-
-private String rmiName;
-
-private String rmiUri;
-
-private final BootstrapConfig parentConfig;
-
-
-public 

Re: [PR] OAK-10887: webapp: remove RMI support [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke merged PR #1527:
URL: https://github.com/apache/jackrabbit-oak/pull/1527


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] OAK-10887: webapp: remove RMI support [jackrabbit-oak]

2024-06-14 Thread via GitHub


reschke opened a new pull request, #1527:
URL: https://github.com/apache/jackrabbit-oak/pull/1527

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



(jackrabbit-oak) 01/01: OAK-10887: webapp: remove RMI support

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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

commit b2a6670f8b489476c1c238a82d529f8e74f12607
Author: Julian Reschke 
AuthorDate: Fri Jun 14 11:20:24 2024 +0100

OAK-10887: webapp: remove RMI support
---
 .../apache/jackrabbit/j2ee/BootstrapConfig.java|  12 -
 .../java/org/apache/jackrabbit/j2ee/RMIConfig.java | 175 ---
 .../jackrabbit/j2ee/RepositoryAccessServlet.java   |  87 +-
 .../jackrabbit/j2ee/RepositoryStartupServlet.java  | 335 ++---
 4 files changed, 22 insertions(+), 587 deletions(-)

diff --git 
a/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java
 
b/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java
index ff2599f282..998ccd43ee 100644
--- 
a/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java
+++ 
b/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java
@@ -56,18 +56,14 @@ public class BootstrapConfig extends AbstractConfig {
 
 private JNDIConfig jndiConfig = new JNDIConfig(this);
 
-private RMIConfig rmiConfig = new RMIConfig(this);
-
 public void init(Properties props) throws ServletException {
 super.init(props);
 jndiConfig.init(props);
-rmiConfig.init(props);
 }
 
 public void init(ServletConfig ctx) throws ServletException {
 super.init(ctx);
 jndiConfig.init(ctx);
-rmiConfig.init(ctx);
 }
 
 public String getRepositoryHome() {
@@ -106,10 +102,6 @@ public class BootstrapConfig extends AbstractConfig {
 return jndiConfig;
 }
 
-public RMIConfig getRmiConfig() {
-return rmiConfig;
-}
-
 public boolean isShutdownOnTimeout() {
 return shutdownOnTimeout;
 }
@@ -137,7 +129,6 @@ public class BootstrapConfig extends AbstractConfig {
 public void validate() {
 valid = repositoryName != null;
 jndiConfig.validate();
-rmiConfig.validate();
 }
 
 
@@ -146,8 +137,5 @@ public class BootstrapConfig extends AbstractConfig {
 if (jndiConfig.isValid()) {
 jndiConfig.logInfos();
 }
-if (rmiConfig.isValid()) {
-rmiConfig.logInfos();
-}
 }
 }
\ No newline at end of file
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
deleted file mode 100644
index 84f98b0df3..00
--- 
a/oak-examples/webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java
+++ /dev/null
@@ -1,175 +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.
- */
-package org.apache.jackrabbit.j2ee;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.rmi.registry.Registry;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-
-/**
- * The RMI config hold information about RMI connection details.
- *
- * It supports the following properties and init parameters:
- * 
- * +---++
- * | Property Name | Init-Param Name|
- * +---++
- * | rmi.enable| {rmi-port sepc.}   |
- * | rmi.host  | rmi-host   |
- * | rmi.port  | rmi-port   |
- * | rmi.name  | {repository name}  |
- * | rmi.url   | rmi-url|
- * +---++
- * 
- */
-public class RMIConfig extends AbstractConfig {
-
-/**
- * default logger
- */
-private static final Logger log = LoggerFactory.getLogger(RMIConfig.class);
-
-private boolean rmiEnabled;
-
-private int rmiPort = -1;
-
-private String rmiHost;
-
-private String rmiName;
-
-private String rmiUri;
-
-private final BootstrapConfig parentConfig;
-
-
-public RMIConfig(BootstrapConfig parentConfig) {
-this.parentConfig = parentConfig;
-}
-
-public void init(ServletConfig ctx) throws ServletException {
-

(jackrabbit-oak) branch OAK-10887 created (now b2a6670f8b)

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

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


  at b2a6670f8b OAK-10887: webapp: remove RMI support

This branch includes the following new commits:

 new b2a6670f8b OAK-10887: webapp: remove RMI support

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.




Re: [PR] Oak-10874 | Add jmx function for bringing forward a delayed async lane to a latest checkpoint. [jackrabbit-oak]

2024-06-14 Thread via GitHub


thomasmueller commented on code in PR #1522:
URL: https://github.com/apache/jackrabbit-oak/pull/1522#discussion_r1639552708


##
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java:
##
@@ -1242,6 +1242,62 @@ public String getReferenceCheckpoint() {
 return referenceCp;
 }
 
+@Override
+public String forceIndexLaneCatchup(String confirmMessage) throws 
CommitFailedException {
+
+if (!"CONFIRM".equals(confirmMessage)) {
+String msg = "Please confirm that you want to force the lane 
catch-up by passing 'CONFIRM' as argument";
+log.warn(msg);
+return msg;
+}
+
+if (!this.isFailing()) {
+String msg = "The lane is not failing. This operation should 
only be performed if the lane is failing, it should first be allowed to catch 
up on its own.";
+log.warn(msg);
+return msg;
+}
+
+try {
+log.info("Running a forced catch-up for indexing lane [{}]. ", 
name);
+// First we need to abort and pause the running indexing task
+this.abortAndPause();

Review Comment:
   I wouldn't mind if this is just an additional preconditions... instead of 
doing it here, just verify it's done. But it's OK, no need to change it now.
   
   (the idea is: We don't want this feature is used a lot, so making it a 
little bit harder to use might help that it is used less often... The "CONFIRM" 
is a great example of that!... Do not make it easy to delete stuff, so that 
it's less likely that stuff is deleted by mistake.)



##
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java:
##
@@ -1242,6 +1242,62 @@ public String getReferenceCheckpoint() {
 return referenceCp;
 }
 
+@Override
+public String forceIndexLaneCatchup(String confirmMessage) throws 
CommitFailedException {
+
+if (!"CONFIRM".equals(confirmMessage)) {
+String msg = "Please confirm that you want to force the lane 
catch-up by passing 'CONFIRM' as argument";
+log.warn(msg);
+return msg;
+}
+
+if (!this.isFailing()) {

Review Comment:
   In theory (not now, but maybe later) we could add an additional check: only 
allow if the indexing lane is behind more than 30 minutes, or something like 
that.
   
   But again, not needed right now.



##
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java:
##
@@ -1242,6 +1242,62 @@ public String getReferenceCheckpoint() {
 return referenceCp;
 }
 
+@Override
+public String forceIndexLaneCatchup(String confirmMessage) throws 
CommitFailedException {
+
+if (!"CONFIRM".equals(confirmMessage)) {
+String msg = "Please confirm that you want to force the lane 
catch-up by passing 'CONFIRM' as argument";
+log.warn(msg);
+return msg;
+}
+
+if (!this.isFailing()) {
+String msg = "The lane is not failing. This operation should 
only be performed if the lane is failing, it should first be allowed to catch 
up on its own.";
+log.warn(msg);
+return msg;
+}
+
+try {
+log.info("Running a forced catch-up for indexing lane [{}]. ", 
name);
+// First we need to abort and pause the running indexing task
+this.abortAndPause();
+log.info("Aborted and paused async indexing for lane [{}]", 
name);
+// Release lease for the paused lane
+this.releaseLeaseForPausedLane();
+log.info("Released lease for paused lane [{}]", name);
+String newReferenceCheckpoint = store.checkpoint(lifetime, 
Map.of(

Review Comment:
   Ah, DEFAULT_LIFETIME is 1000 days! could you change that to 100 days please? 
That should still be plenty, but (hopefully) will result in slightly less 
"orphaned checkpoints".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user mbaedke (triggered by mbaedke).

Head commit for run:
f97b8322d3fb5a46f77f973bcf2f1017ab882121 / Manfred Baedke 

Revert "OAK.-10812: NodeStore#diffManyChildren(...) may produce incorrect 
results in readonly mode"

This reverts commit afe29b986d18d7fc4de5528f2e8bc24a839cbcd9.

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9513547347

With regards,
GitHub Actions via GitBox



(jackrabbit-oak) branch issue/oak-10812 updated (afe29b986d -> f97b8322d3)

2024-06-14 Thread baedke
This is an automated email from the ASF dual-hosted git repository.

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


from afe29b986d OAK.-10812: NodeStore#diffManyChildren(...) may produce 
incorrect results in readonly mode
 add f97b8322d3 Revert "OAK.-10812: NodeStore#diffManyChildren(...) may 
produce incorrect results in readonly mode"

No new revisions were added by this update.

Summary of changes:
 .../main/java/org/apache/jackrabbit/oak/plugins/document/util/Utils.java | 1 +
 1 file changed, 1 insertion(+)



[GH] (jackrabbit-oak): Workflow run "SonarCloud" is working again!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has succeeded.
Run started by GitHub user nit0906 (triggered by nit0906).

Head commit for run:
0cb2be08d3ca36835a41c2ad6263a2ca566a9abf / Nitin Gupta 
typo fix

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9512825013

With regards,
GitHub Actions via GitBox



Re: [PR] Oak-10874 | Add jmx function for bringing forward a delayed async lane to a latest checkpoint. [jackrabbit-oak]

2024-06-14 Thread via GitHub


nit0906 commented on code in PR #1522:
URL: https://github.com/apache/jackrabbit-oak/pull/1522#discussion_r1639441493


##
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java:
##
@@ -1242,6 +1242,61 @@ public String getReferenceCheckpoint() {
 return referenceCp;
 }
 
+@Override
+public String forceIndexLaneCatchup(String confirmMessage) throws 
CommitFailedException {
+
+if (!"CONFIRM".equals(confirmMessage)) {
+String msg = "Please confirm that you want to force the lane 
catch-up by passing 'CONFIRM' as argument";
+log.warn(msg);
+return msg;
+}
+
+if (!this.isFailing()) {
+String msg = "The lane is not failing. This operation should 
only be performed if the lane is failing, it should first be allowed to catch 
up on its own.";
+log.warn(msg);
+return msg;
+}
+
+try {
+log.info("Running a forced catch-up for indexing lane [{}]. ", 
name);
+// First we need to abort and pause the running indexing task
+this.abortAndPause();
+log.info("Aborted and paused async indexing for lane [{}]", 
name);
+// Release lease for the paused lane
+this.releaseLeaseForPausedLane();
+log.info("Released lease for paused lane [{}]", name);
+String newReferenceCheckpoint = store.checkpoint(lifetime, 
Map.of(
+"creator", AsyncIndexUpdate.class.getSimpleName(),
+"created", now(),
+"thread", Thread.currentThread().getName(),
+"name", name + "-forceModified"));
+String existingReferenceCheckpoint = this.referenceCp;
+log.info("Modifying the referred checkpoint for lane [{}] from 
{} to {}." +
+" This means that any content modifications between 
these checkpoints will not reflect in the indexes on this lane." +
+" Reindexing is needed to get this content indexed.", 
name, existingReferenceCheckpoint, newReferenceCheckpoint);
+NodeBuilder builder = store.getRoot().builder();
+builder.child(ASYNC).setProperty(name, newReferenceCheckpoint);
+this.referenceCp = newReferenceCheckpoint;
+mergeWithConcurrencyCheck(store, validatorProviders, builder, 
existingReferenceCheckpoint, null, name);
+// Remove the existing reference checkpoint
+if (store.release(existingReferenceCheckpoint)) {
+log.info("Old reference checkpoint {} removed or didn't 
exist", existingReferenceCheckpoint);
+} else {
+log.warn("Unable to remove old reference checkpoint {}. 
This can result in orphaned checkpoints and would need to be removed 
manually.", existingReferenceCheckpoint);
+}
+// Resume the paused lane;
+this.resume();
+log.info("Resumed async indexing for lane [{}]", name);
+return "Lane successfully forced to catch-up. New reference 
checkpoint is " + newReferenceCheckpoint + " . Please make sure to perform 
reindexing to get the diff content indexed.";
+} catch (Exception e) {
+log.error("Exception while trying to force update the indexing 
lane [{}]", name, e);
+if (this.isPaused()) {
+log.info("Resuming the lane [{}] as it was paused during 
the operation", name);

Review Comment:
   good catch. Thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Oak-10874 | Add jmx function for bringing forward a delayed async lane to a latest checkpoint. [jackrabbit-oak]

2024-06-14 Thread via GitHub


nfsantos commented on code in PR #1522:
URL: https://github.com/apache/jackrabbit-oak/pull/1522#discussion_r1639428734


##
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java:
##
@@ -1242,6 +1242,61 @@ public String getReferenceCheckpoint() {
 return referenceCp;
 }
 
+@Override
+public String forceIndexLaneCatchup(String confirmMessage) throws 
CommitFailedException {
+
+if (!"CONFIRM".equals(confirmMessage)) {
+String msg = "Please confirm that you want to force the lane 
catch-up by passing 'CONFIRM' as argument";
+log.warn(msg);
+return msg;
+}
+
+if (!this.isFailing()) {
+String msg = "The lane is not failing. This operation should 
only be performed if the lane is failing, it should first be allowed to catch 
up on its own.";
+log.warn(msg);
+return msg;
+}
+
+try {
+log.info("Running a forced catch-up for indexing lane [{}]. ", 
name);
+// First we need to abort and pause the running indexing task
+this.abortAndPause();
+log.info("Aborted and paused async indexing for lane [{}]", 
name);
+// Release lease for the paused lane
+this.releaseLeaseForPausedLane();
+log.info("Released lease for paused lane [{}]", name);
+String newReferenceCheckpoint = store.checkpoint(lifetime, 
Map.of(
+"creator", AsyncIndexUpdate.class.getSimpleName(),
+"created", now(),
+"thread", Thread.currentThread().getName(),
+"name", name + "-forceModified"));
+String existingReferenceCheckpoint = this.referenceCp;
+log.info("Modifying the referred checkpoint for lane [{}] from 
{} to {}." +
+" This means that any content modifications between 
these checkpoints will not reflect in the indexes on this lane." +
+" Reindexing is needed to get this content indexed.", 
name, existingReferenceCheckpoint, newReferenceCheckpoint);
+NodeBuilder builder = store.getRoot().builder();
+builder.child(ASYNC).setProperty(name, newReferenceCheckpoint);
+this.referenceCp = newReferenceCheckpoint;
+mergeWithConcurrencyCheck(store, validatorProviders, builder, 
existingReferenceCheckpoint, null, name);
+// Remove the existing reference checkpoint
+if (store.release(existingReferenceCheckpoint)) {
+log.info("Old reference checkpoint {} removed or didn't 
exist", existingReferenceCheckpoint);
+} else {
+log.warn("Unable to remove old reference checkpoint {}. 
This can result in orphaned checkpoints and would need to be removed 
manually.", existingReferenceCheckpoint);
+}
+// Resume the paused lane;
+this.resume();
+log.info("Resumed async indexing for lane [{}]", name);
+return "Lane successfully forced to catch-up. New reference 
checkpoint is " + newReferenceCheckpoint + " . Please make sure to perform 
reindexing to get the diff content indexed.";
+} catch (Exception e) {
+log.error("Exception while trying to force update the indexing 
lane [{}]", name, e);
+if (this.isPaused()) {
+log.info("Resuming the lane [{}] as it was paused during 
the operation", name);

Review Comment:
   Should there be a call to resume here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Oak-10874 | Add jmx function for bringing forward a delayed async lane to a latest checkpoint. [jackrabbit-oak]

2024-06-14 Thread via GitHub


nfsantos commented on code in PR #1522:
URL: https://github.com/apache/jackrabbit-oak/pull/1522#discussion_r1639426483


##
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java:
##
@@ -1242,6 +1242,61 @@ public String getReferenceCheckpoint() {
 return referenceCp;
 }
 
+@Override
+public String forceIndexLaneCatchup(String confirmMessage) throws 
CommitFailedException {
+
+if (!"CONFIRM".equals(confirmMessage)) {
+String msg = "Please confirm that you want to force the lane 
catch-up by passing 'CONFIRM' as argument";
+log.warn(msg);
+return msg;
+}
+
+if (!this.isFailing()) {
+String msg = "The lane is not failing. This operation should 
only be performed if the lane is failing, it should first be allowed to catch 
up on its own.";
+log.warn(msg);
+return msg;
+}
+
+try {
+log.info("Running a forced catch-up for indexing lane [{}]. ", 
name);
+// First we need to abort and pause the running indexing task
+this.abortAndPause();
+log.info("Aborted and paused async indexing for lane [{}]", 
name);
+// Release lease for the paused lane
+this.releaseLeaseForPausedLane();
+log.info("Released lease for paused lane [{}]", name);
+String newReferenceCheckpoint = store.checkpoint(lifetime, 
Map.of(
+"creator", AsyncIndexUpdate.class.getSimpleName(),
+"created", now(),
+"thread", Thread.currentThread().getName(),
+"name", name + "-forceModified"));
+String existingReferenceCheckpoint = this.referenceCp;
+log.info("Modifying the referred checkpoint for lane [{}] from 
{} to {}." +
+" This means that any content modifications between 
these checkpoints will not reflect in the indexes on this lane." +
+" Reindexing is needed to get this content indexed.", 
name, existingReferenceCheckpoint, newReferenceCheckpoint);
+NodeBuilder builder = store.getRoot().builder();
+builder.child(ASYNC).setProperty(name, newReferenceCheckpoint);
+this.referenceCp = newReferenceCheckpoint;
+mergeWithConcurrencyCheck(store, validatorProviders, builder, 
existingReferenceCheckpoint, null, name);
+// Remove the existing reference checkpoint
+if (store.release(existingReferenceCheckpoint)) {
+log.info("Old reference checkpoint {} removed or didn't 
exist", existingReferenceCheckpoint);
+} else {
+log.warn("Unable to remove old reference checkpoint {}. 
This can result in orphaned checkpoints and would need to be removed 
manually.", existingReferenceCheckpoint);
+}
+// Resume the paused lane;
+this.resume();
+log.info("Resumed async indexing for lane [{}]", name);
+return "Lane successfully forced to catch-up. New reference 
checkpoint is " + newReferenceCheckpoint + " . Please make sure to perform 
reindexing to get the diff content indexed.";
+} catch (Exception e) {
+log.error("Exception while trying to force update the indexing 
lane [{}]", name, e);
+if (this.isPaused()) {
+log.info("Resuming the lane [{}] as it was paused during 
the operation", name);
+}
+return "Unable to complete the force update due to" + 
e.getMessage() + "Please check logs for more details";

Review Comment:
   ```suggestion
   return "Unable to complete the force update due to " + 
e.getMessage() + ". Please check logs for more details";
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Oak-10874 | Add jmx function for bringing forward a delayed async lane to a latest checkpoint. [jackrabbit-oak]

2024-06-14 Thread via GitHub


nfsantos commented on code in PR #1522:
URL: https://github.com/apache/jackrabbit-oak/pull/1522#discussion_r1639426483


##
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java:
##
@@ -1242,6 +1242,61 @@ public String getReferenceCheckpoint() {
 return referenceCp;
 }
 
+@Override
+public String forceIndexLaneCatchup(String confirmMessage) throws 
CommitFailedException {
+
+if (!"CONFIRM".equals(confirmMessage)) {
+String msg = "Please confirm that you want to force the lane 
catch-up by passing 'CONFIRM' as argument";
+log.warn(msg);
+return msg;
+}
+
+if (!this.isFailing()) {
+String msg = "The lane is not failing. This operation should 
only be performed if the lane is failing, it should first be allowed to catch 
up on its own.";
+log.warn(msg);
+return msg;
+}
+
+try {
+log.info("Running a forced catch-up for indexing lane [{}]. ", 
name);
+// First we need to abort and pause the running indexing task
+this.abortAndPause();
+log.info("Aborted and paused async indexing for lane [{}]", 
name);
+// Release lease for the paused lane
+this.releaseLeaseForPausedLane();
+log.info("Released lease for paused lane [{}]", name);
+String newReferenceCheckpoint = store.checkpoint(lifetime, 
Map.of(
+"creator", AsyncIndexUpdate.class.getSimpleName(),
+"created", now(),
+"thread", Thread.currentThread().getName(),
+"name", name + "-forceModified"));
+String existingReferenceCheckpoint = this.referenceCp;
+log.info("Modifying the referred checkpoint for lane [{}] from 
{} to {}." +
+" This means that any content modifications between 
these checkpoints will not reflect in the indexes on this lane." +
+" Reindexing is needed to get this content indexed.", 
name, existingReferenceCheckpoint, newReferenceCheckpoint);
+NodeBuilder builder = store.getRoot().builder();
+builder.child(ASYNC).setProperty(name, newReferenceCheckpoint);
+this.referenceCp = newReferenceCheckpoint;
+mergeWithConcurrencyCheck(store, validatorProviders, builder, 
existingReferenceCheckpoint, null, name);
+// Remove the existing reference checkpoint
+if (store.release(existingReferenceCheckpoint)) {
+log.info("Old reference checkpoint {} removed or didn't 
exist", existingReferenceCheckpoint);
+} else {
+log.warn("Unable to remove old reference checkpoint {}. 
This can result in orphaned checkpoints and would need to be removed 
manually.", existingReferenceCheckpoint);
+}
+// Resume the paused lane;
+this.resume();
+log.info("Resumed async indexing for lane [{}]", name);
+return "Lane successfully forced to catch-up. New reference 
checkpoint is " + newReferenceCheckpoint + " . Please make sure to perform 
reindexing to get the diff content indexed.";
+} catch (Exception e) {
+log.error("Exception while trying to force update the indexing 
lane [{}]", name, e);
+if (this.isPaused()) {
+log.info("Resuming the lane [{}] as it was paused during 
the operation", name);
+}
+return "Unable to complete the force update due to" + 
e.getMessage() + "Please check logs for more details";

Review Comment:
   ```suggestion
   return "Unable to complete the force update due to" + 
e.getMessage() + ". Please check logs for more details";
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user mbaedke (triggered by mbaedke).

Head commit for run:
afe29b986d18d7fc4de5528f2e8bc24a839cbcd9 / mbaedke 
OAK.-10812: NodeStore#diffManyChildren(...) may produce incorrect results in 
readonly mode

Adjusted start timestamp for diff.

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9512555044

With regards,
GitHub Actions via GitBox



(jackrabbit-oak) branch issue/oak-10812 updated (6b76fb2bb7 -> afe29b986d)

2024-06-14 Thread baedke
This is an automated email from the ASF dual-hosted git repository.

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


from 6b76fb2bb7 OAK-10812: DocumentNodeStore#diffManyChildren(...) may 
produce incorrect results in readonly mode
 add afe29b986d OAK.-10812: NodeStore#diffManyChildren(...) may produce 
incorrect results in readonly mode

No new revisions were added by this update.

Summary of changes:
 .../main/java/org/apache/jackrabbit/oak/plugins/document/util/Utils.java | 1 -
 1 file changed, 1 deletion(-)



[PR] OAK-10803 -- compress/uncompress property [jackrabbit-oak]

2024-06-14 Thread via GitHub


ionutzpi opened a new pull request, #1526:
URL: https://github.com/apache/jackrabbit-oak/pull/1526

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user reschke (triggered by reschke).

Head commit for run:
06f54302a53a1e34f937982c310d3c03e16dbce0 / Julian Reschke 

revert "JCR-5072: Release Jackrabbit 2.22.0 - update site"

This reverts commit 229fc4b0d7436f59638a77a1ae0dbdf48aaeb056.

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9511527264

With regards,
GitHub Actions via GitBox



[GH] (jackrabbit-oak): Workflow run "SonarCloud" failed!

2024-06-14 Thread GitBox


The GitHub Actions job "SonarCloud" on jackrabbit-oak.git has failed.
Run started by GitHub user reschke (triggered by reschke).

Head commit for run:
229fc4b0d7436f59638a77a1ae0dbdf48aaeb056 / Julian Reschke 

JCR-5072: Release Jackrabbit 2.22.0 - update site

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/9511356786

With regards,
GitHub Actions via GitBox



(jackrabbit-oak) branch trunk updated: revert "JCR-5072: Release Jackrabbit 2.22.0 - update site"

2024-06-14 Thread reschke
This is an automated email from the ASF dual-hosted git repository.

reschke 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 06f54302a5 revert "JCR-5072: Release Jackrabbit 2.22.0 - update site"
06f54302a5 is described below

commit 06f54302a53a1e34f937982c310d3c03e16dbce0
Author: Julian Reschke 
AuthorDate: Fri Jun 14 07:12:28 2024 +0100

revert "JCR-5072: Release Jackrabbit 2.22.0 - update site"

This reverts commit 229fc4b0d7436f59638a77a1ae0dbdf48aaeb056.
---
 oak-examples/webapp/pom.xml | 5 +
 1 file changed, 5 insertions(+)

diff --git a/oak-examples/webapp/pom.xml b/oak-examples/webapp/pom.xml
index a4f0b98d7a..3c767a72a6 100644
--- a/oak-examples/webapp/pom.xml
+++ b/oak-examples/webapp/pom.xml
@@ -78,6 +78,11 @@
   jackrabbit-jcr-servlet
   ${jackrabbit.version}
 
+
+  org.apache.jackrabbit
+  jackrabbit-jcr-rmi
+  ${jackrabbit.version}
+
 
   org.apache.jackrabbit
   oak-jcr



Re: Authorizable for EveryonePrincipal

2024-06-14 Thread Angela Schreiber
Hi Konrad

As I said, Oak out of the box doesn't mandate a group representation of the 
everyone principal to exist.

In AEM it is created with a content package (or repoinit) which results in a 
regular call to UserManager.createGroup.

see also 
https://jackrabbit.apache.org/oak/docs/security/user/default.html#everyone-group

The code should have a null check. Even if the group were to be created in the 
UserInitializer it could be removed for a particular session (transiently) and 
then the call would still return null.

So fixing the code is the right choice as changes in Oak would not help in this 
situation.

Hope that helps
Angela

From: Konrad Windszus 
Sent: Thursday, June 13, 2024 19:43
To: oak-dev@jackrabbit.apache.org 
Subject: Re: Authorizable for EveryonePrincipal

EXTERNAL: Use caution when clicking on links or opening attachments.


I meanwhile found 
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java
 which creates both the admin and the anonymous user, but haven’t found out yet 
how “everyone” is being created.

> On 13. Jun 2024, at 19:30, Konrad Windszus  wrote:
>
> Hi Angela,
> Thanks a lot for your input.
> As it turned out in some instances the according “everyone" authorizable has 
> been removed by mistake and some code cannot deal with that (due to missing 
> null checks).
> I am wondering though who Jackrabbit creates the “everyone” authorizable in 
> the first place, and why it isn’t being restored after a restart 
> automatically.
>
> In Sling usually such setup is done via repoinit, but I guess in Oak there 
> should also be some kind of repo initialization which automatically restores 
> the most essential parts for running Oak in case of a restart,
> Maybe we can improve Oak to automatically fix such user mistakes.
>
> Do you have some pointers to the code which creates the “everyone” 
> authorizable in the first place?
> Thanks,
> Konrad
>
>
>> On 13. Jun 2024, at 18:53, Angela Schreiber  
>> wrote:
>>
>> Hi Konrad
>>
>> There has been no change in that area for ages.
>>
>> Oak out of the box does not mandate a Group 'everyone' to exist in the user 
>> management. It will however always exist if you retrieve it through 
>> Principal Manager in the default implementation. So,
>>
>>
>> *
>> every user/group accessible through user management API will have a 
>> principal attached that is also accessible through principal management API
>> *
>> no every principal accessible through the principal management API is 
>> guaranteed to be backed by a user/group in user management.
>>
>> Reason: principals are required for access control setup. They may come from 
>> any source plugged into Oak and one source of principals is user/groups 
>> stored in the repository.
>>
>> AEM out of the box will have a group 'everyone' installed but if you 
>> chose to remove it, the access control evaluation and principal resolution 
>> for your logged in user would still work.
>> So, testing for the lookup of the group to null, would just be defensive 
>> programming.
>>
>> Hope that helps
>> Angela
>>
>>
>> 
>> From: Konrad Windszus 
>> Sent: Thursday, June 13, 2024 17:07
>> To: oak-dev@jackrabbit.apache.org 
>> Subject: Authorizable for EveryonePrincipal
>>
>> EXTERNAL: Use caution when clicking on links or opening attachments.
>>
>>
>> Hi,
>> Was it always the case that the “everyone" principal could not be resolved 
>> to an Authorizable via 
>> org.apache.jackrabbit.api.security.user.UserManager.getAuthorizable()?
>> I found several places in AEM code where the return value of 
>> UserManager.getAuthorizable(Principal) is unconditionally dereferenced.
>>
>> Is the null return value a new behaviour or has it always been like that?
>>
>> Thanks,
>> Konrad
>