[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1066: OAK-10399 Automatically pick a merged index over multiple levels

2023-08-30 Thread via GitHub


sonarcloud[bot] commented on PR #1066:
URL: https://github.com/apache/jackrabbit-oak/pull/1066#issuecomment-1698886255

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=false=CODE_SMELL)
   
   
[![88.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'88.9%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=new_coverage=list)
 [88.9% 
Coverage](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1066=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20) you have used to run this analysis is 
deprecated and we will stop accepting it soon. Please update to at least Java 
17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] thomasmueller merged pull request #1066: OAK-10399 Automatically pick a merged index over multiple levels

2023-08-30 Thread via GitHub


thomasmueller merged PR #1066:
URL: https://github.com/apache/jackrabbit-oak/pull/1066


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] thomasmueller commented on a diff in pull request #1066: OAK-10399 Automatically pick a merged index over multiple levels

2023-08-30 Thread via GitHub


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


##
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/IndexName.java:
##
@@ -231,26 +231,37 @@ public String nextCustomizedName() {
 }
 
 public static boolean isIndexActive(String indexPath, NodeState rootState) 
{
+return isIndexActive(indexPath, rootState, 0);
+}
+
+private static boolean isIndexActive(String indexPath, NodeState 
rootState, int recursionDepth) {
 // An index is active if it has a hidden child node that starts with 
":oak:mount-",
 // OR if it is an active merged index
-try {
-NodeState indexNode = rootState;
-for (String e : PathUtils.elements(indexPath)) {
-indexNode = indexNode.getChildNode(e);
+if (recursionDepth > 50) {
+LOG.warn("Fail to check index activeness for {} due to high 
recursion depth", indexPath);

Review Comment:
   Logging the recursion depths seems only needed if we make it configurable. 
But OK, it doesn't hurt.



##
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/IndexName.java:
##
@@ -231,26 +231,37 @@ public String nextCustomizedName() {
 }
 
 public static boolean isIndexActive(String indexPath, NodeState rootState) 
{
+return isIndexActive(indexPath, rootState, 0);
+}
+
+private static boolean isIndexActive(String indexPath, NodeState 
rootState, int recursionDepth) {
 // An index is active if it has a hidden child node that starts with 
":oak:mount-",
 // OR if it is an active merged index
-try {
-NodeState indexNode = rootState;
-for (String e : PathUtils.elements(indexPath)) {
-indexNode = indexNode.getChildNode(e);
+if (recursionDepth > 50) {

Review Comment:
   I'm not quite sure what the added indirection would help in this case: we 
only use the setting once. But OK, I'll add a constant.



##
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/IndexName.java:
##
@@ -231,26 +231,37 @@ public String nextCustomizedName() {
 }
 
 public static boolean isIndexActive(String indexPath, NodeState rootState) 
{
+return isIndexActive(indexPath, rootState, 0);
+}
+
+private static boolean isIndexActive(String indexPath, NodeState 
rootState, int recursionDepth) {
 // An index is active if it has a hidden child node that starts with 
":oak:mount-",
 // OR if it is an active merged index
-try {
-NodeState indexNode = rootState;
-for (String e : PathUtils.elements(indexPath)) {
-indexNode = indexNode.getChildNode(e);
+if (recursionDepth > 50) {
+LOG.warn("Fail to check index activeness for {} due to high 
recursion depth", indexPath);
+return true;
+}
+NodeState indexNode = rootState;
+for (String e : PathUtils.elements(indexPath)) {
+indexNode = indexNode.getChildNode(e);
+}
+for (String c : indexNode.getChildNodeNames()) {
+if (c.startsWith(":oak:mount-")) {
+return true;
 }
-for (String c : indexNode.getChildNodeNames()) {
-if (c.startsWith(":oak:mount-")) {
-return true;
-}
+}
+if (recursionDepth >= 2) {

Review Comment:
   Level 1 (the direct children) will still need to check. 
   
   > Is there a test for this case?
   
   Yes: CustomizedIndexTest and IndexNameTest are in the patch. The test 
coverage of the changes is 100% as far as I see.
   
   
   
   



##
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/IndexName.java:
##
@@ -231,26 +231,37 @@ public String nextCustomizedName() {
 }
 
 public static boolean isIndexActive(String indexPath, NodeState rootState) 
{
+return isIndexActive(indexPath, rootState, 0);
+}
+
+private static boolean isIndexActive(String indexPath, NodeState 
rootState, int recursionDepth) {
 // An index is active if it has a hidden child node that starts with 
":oak:mount-",
 // OR if it is an active merged index
-try {
-NodeState indexNode = rootState;
-for (String e : PathUtils.elements(indexPath)) {
-indexNode = indexNode.getChildNode(e);
+if (recursionDepth > 50) {
+LOG.warn("Fail to check index activeness for {} due to high 
recursion depth", indexPath);
+return true;
+}
+NodeState indexNode = rootState;
+for (String e : PathUtils.elements(indexPath)) {
+indexNode = indexNode.getChildNode(e);
+}

Review Comment:
   This is a _loop_ over all the entries in the 

[GitHub] [jackrabbit-oak] thomasmueller commented on a diff in pull request #1066: OAK-10399 Automatically pick a merged index over multiple levels

2023-08-30 Thread via GitHub


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


##
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/IndexName.java:
##
@@ -231,26 +231,37 @@ public String nextCustomizedName() {
 }
 
 public static boolean isIndexActive(String indexPath, NodeState rootState) 
{
+return isIndexActive(indexPath, rootState, 0);
+}
+
+private static boolean isIndexActive(String indexPath, NodeState 
rootState, int recursionDepth) {
 // An index is active if it has a hidden child node that starts with 
":oak:mount-",
 // OR if it is an active merged index
-try {
-NodeState indexNode = rootState;
-for (String e : PathUtils.elements(indexPath)) {
-indexNode = indexNode.getChildNode(e);
+if (recursionDepth > 50) {
+LOG.warn("Fail to check index activeness for {} due to high 
recursion depth", indexPath);

Review Comment:
   Logging the recursion depths seems only useful if we make it configurable. 
But OK, it doesn't hurt.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke merged pull request #1102: OAK-10430: oak-*-azure: add to OSGi tests

2023-09-05 Thread via GitHub


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


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke closed pull request #1103: OAK-10421: Bump up minimal warning level for deprecated uses of java.security.Group to INFO

2023-09-05 Thread via GitHub


reschke closed pull request #1103: OAK-10421: Bump up minimal warning level for 
deprecated uses of java.security.Group to INFO
URL: https://github.com/apache/jackrabbit-oak/pull/1103


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1103: OAK-10421: Bump up minimal warning level for deprecated uses of java.security.Group to INFO

2023-09-05 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1104: OAK-10421: Bump up minimal warning level for deprecated uses of java.security.Group to INFO

2023-09-05 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg commented on pull request #1099: OAK-10413: DocumentStoreIndexerIT hanging

2023-09-05 Thread via GitHub


mreutegg commented on PR #1099:
URL: https://github.com/apache/jackrabbit-oak/pull/1099#issuecomment-1706498327

   This time all tests ran successfully.


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke merged pull request #1104: OAK-10421: Bump up minimal warning level for deprecated uses of java.security.Group to INFO

2023-09-05 Thread via GitHub


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


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1102: OAK-10430: oak-*-azure: add to OSGi tests

2023-09-05 Thread via GitHub


sonarcloud[bot] commented on PR #1102:
URL: https://github.com/apache/jackrabbit-oak/pull/1102#issuecomment-1706404215

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=coverage=list)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1102=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20) you have used to run this analysis is 
deprecated and we will stop accepting it soon. Please update to at least Java 
17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg merged pull request #1099: OAK-10413: DocumentStoreIndexerIT hanging

2023-09-05 Thread via GitHub


mreutegg merged PR #1099:
URL: https://github.com/apache/jackrabbit-oak/pull/1099


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] thomasmueller commented on a diff in pull request #1094: OAK-10424 add support for INSECURE RESULTSIZE and INSECURE FACETS query options and rep:insecureQueryOptions privileg

2023-09-05 Thread via GitHub


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


##
oak-core/src/main/java/org/apache/jackrabbit/oak/query/UnionQueryImpl.java:
##
@@ -195,7 +195,13 @@ public long getSize(SizePrecision precision, long max) {
 long total = QueryImpl.saturatedAdd(a, b);
 return Math.min(localLimit, total);
 }
-
+
+@Override
+public boolean isInsecureResultSize() {
+// assumes that the same queryOptions are passed to both left and 
right queries in setQueryOptions()
+return right.isInsecureResultSize();

Review Comment:
   Why not use left.isInsecureResultSize() || right.isInsecureResultSize(): 
that way the implementation can be changed later.



##
oak-core/src/main/java/org/apache/jackrabbit/oak/query/xpath/Statement.java:
##
@@ -382,6 +382,18 @@ private static void appendQueryOptions(StringBuilder buff, 
QueryOptions queryOpt
 SQL2Parser::escapeStringLiteral));
 optionValues.add("prefetch (" + list + ")");
 }
+if (queryOptions.hasInsecureOptions()) {
+List insecureOpts = new ArrayList<>();
+insecureOpts.add("insecure");
+if (queryOptions.insecureResultSize) {
+insecureOpts.add("resultsize");

Review Comment:
   I don't like "resultsize" as it's two words concatenated... Options are:
   * "resultsize": can be hard to read
   * "result_size": looks a bit ugly
   * "resultSize": the parser is not case sensitive so it might work
   * "result size": this approach is used for "index tag" already
   
   I would prefer "result size" (two words).



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg commented on pull request #1011: OAK-10334: Node.addMixin() may overwrite existing mixins

2023-09-04 Thread via GitHub


mreutegg commented on PR #1011:
URL: https://github.com/apache/jackrabbit-oak/pull/1011#issuecomment-1704698862

   Follow up issue regarding Node.removeMixin(String): 
[OAK-10425](https://issues.apache.org/jira/browse/OAK-10425)


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] tihom88 commented on pull request #1042: OAK-10358 - Filter by path on MongoDB query when downloading repository in Indexing job

2023-09-04 Thread via GitHub


tihom88 commented on PR #1042:
URL: https://github.com/apache/jackrabbit-oak/pull/1042#issuecomment-1704903507

   How are we tackling long paths. IIRC long paths are saved as 
:h/


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] rishabhdaim commented on a diff in pull request #1090: OAK-8646 : Clean up changes from orphaned branch commits

2023-09-04 Thread via GitHub


rishabhdaim commented on code in PR #1090:
URL: https://github.com/apache/jackrabbit-oak/pull/1090#discussion_r1314892637


##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java:
##
@@ -902,6 +905,206 @@ private void collectDeletedProperties(final NodeDocument 
doc, final GCPhases pha
 }
 }
 
+private void collectUnmergedBranchCommitDocument(final NodeDocument 
doc,
+long toModifiedMillis, final GCPhases phases, final UpdateOp 
updateOp) {
+if (!phases.start(GCPhase.DETAILED_GC_COLLECT_UNMERGED_BC)) {
+// GC was cancelled, stop
+return;
+}
+
+// from
+// 
https://jackrabbit.apache.org/oak/docs/nodestore/documentmk.html#previous-documents
+// "branch commits are not moved to previous documents until the 
branch is
+// merged."
+// i.e. if we're looking for unmerged branch commits, they cannot 
be in
+// previous documents, they have to be in the main one - hence we 
have to use
+// getLocalBranchCommits here
+final Set localBranchCommits = 
doc.getLocalBranchCommits();
+if (localBranchCommits.isEmpty()) {
+// nothing to do then
+phases.stop(GCPhase.DETAILED_GC_COLLECT_UNMERGED_BC);
+return;
+}
+
+// !Note, the _bc sub-document was introduced with Oak 1.8 and is 
not present
+// in older versions. The branch commit revision is added to _bc 
whenever a
+// change is done on a document with a branch commit. This helps 
the
+// DocumentNodeStore to more easily identify branch commit 
changes."
+// The current implementation of 
"collectUnmergedBranchCommitDocument" only
+// supports branch commits that are created after Oak 1.8
+for (Revision bcRevision : localBranchCommits) {
+if (!isRevisionOlderThan(bcRevision, toModifiedMillis)) {
+// only even consider revisions that are older than the 
provided
+// timestamp - otherwise skip this
+continue;
+}
+final String commitValue = 
nodeStore.getCommitValue(bcRevision, doc);
+if (isCommitted(commitValue)) {
+// obviously don't do anything with merged (committed) 
branch commits
+continue;
+}
+removeUnmergedBCRevision(bcRevision, doc, updateOp);
+}
+// now for any of the handled system properties (the normal 
properties would
+// already be cleaned up by cleanupDeletedProperties), the 
resulting
+// subdocument could in theory become empty after removing all 
unmerged branch
+// commit revisions is done later.
+// so we need to go through all of them and check if we'd have 
removed
+// the entirety - and then, instead of individually remove 
revisions, just
+// delete the entire property.
+if (updateOp.hasChanges()) {

Review Comment:
   This can be further optimized by considering the case where `updateOp` has 
changed for the `unmergedBranchCommit` phase.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] rishabhdaim commented on a diff in pull request #1090: OAK-8646 : Clean up changes from orphaned branch commits

2023-09-04 Thread via GitHub


rishabhdaim commented on code in PR #1090:
URL: https://github.com/apache/jackrabbit-oak/pull/1090#discussion_r1314892637


##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java:
##
@@ -902,6 +905,206 @@ private void collectDeletedProperties(final NodeDocument 
doc, final GCPhases pha
 }
 }
 
+private void collectUnmergedBranchCommitDocument(final NodeDocument 
doc,
+long toModifiedMillis, final GCPhases phases, final UpdateOp 
updateOp) {
+if (!phases.start(GCPhase.DETAILED_GC_COLLECT_UNMERGED_BC)) {
+// GC was cancelled, stop
+return;
+}
+
+// from
+// 
https://jackrabbit.apache.org/oak/docs/nodestore/documentmk.html#previous-documents
+// "branch commits are not moved to previous documents until the 
branch is
+// merged."
+// i.e. if we're looking for unmerged branch commits, they cannot 
be in
+// previous documents, they have to be in the main one - hence we 
have to use
+// getLocalBranchCommits here
+final Set localBranchCommits = 
doc.getLocalBranchCommits();
+if (localBranchCommits.isEmpty()) {
+// nothing to do then
+phases.stop(GCPhase.DETAILED_GC_COLLECT_UNMERGED_BC);
+return;
+}
+
+// !Note, the _bc sub-document was introduced with Oak 1.8 and is 
not present
+// in older versions. The branch commit revision is added to _bc 
whenever a
+// change is done on a document with a branch commit. This helps 
the
+// DocumentNodeStore to more easily identify branch commit 
changes."
+// The current implementation of 
"collectUnmergedBranchCommitDocument" only
+// supports branch commits that are created after Oak 1.8
+for (Revision bcRevision : localBranchCommits) {
+if (!isRevisionOlderThan(bcRevision, toModifiedMillis)) {
+// only even consider revisions that are older than the 
provided
+// timestamp - otherwise skip this
+continue;
+}
+final String commitValue = 
nodeStore.getCommitValue(bcRevision, doc);
+if (isCommitted(commitValue)) {
+// obviously don't do anything with merged (committed) 
branch commits
+continue;
+}
+removeUnmergedBCRevision(bcRevision, doc, updateOp);
+}
+// now for any of the handled system properties (the normal 
properties would
+// already be cleaned up by cleanupDeletedProperties), the 
resulting
+// subdocument could in theory become empty after removing all 
unmerged branch
+// commit revisions is done later.
+// so we need to go through all of them and check if we'd have 
removed
+// the entirety - and then, instead of individually remove 
revisions, just
+// delete the entire property.
+if (updateOp.hasChanges()) {

Review Comment:
   I believe this can be further optimized by considering the case where 
`updateOp` has changed for `unmergedBranchCommit` phase.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] thomasmueller opened a new pull request, #1096: Oak 9976

2023-09-04 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] rishabhdaim commented on a diff in pull request #1090: OAK-8646 : Clean up changes from orphaned branch commits

2023-09-04 Thread via GitHub


rishabhdaim commented on code in PR #1090:
URL: https://github.com/apache/jackrabbit-oak/pull/1090#discussion_r1314932211


##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java:
##
@@ -902,6 +905,206 @@ private void collectDeletedProperties(final NodeDocument 
doc, final GCPhases pha
 }
 }
 
+private void collectUnmergedBranchCommitDocument(final NodeDocument 
doc,
+long toModifiedMillis, final GCPhases phases, final UpdateOp 
updateOp) {
+if (!phases.start(GCPhase.DETAILED_GC_COLLECT_UNMERGED_BC)) {
+// GC was cancelled, stop
+return;
+}
+
+// from
+// 
https://jackrabbit.apache.org/oak/docs/nodestore/documentmk.html#previous-documents
+// "branch commits are not moved to previous documents until the 
branch is
+// merged."
+// i.e. if we're looking for unmerged branch commits, they cannot 
be in
+// previous documents, they have to be in the main one - hence we 
have to use
+// getLocalBranchCommits here
+final Set localBranchCommits = 
doc.getLocalBranchCommits();
+if (localBranchCommits.isEmpty()) {
+// nothing to do then
+phases.stop(GCPhase.DETAILED_GC_COLLECT_UNMERGED_BC);
+return;
+}
+
+// !Note, the _bc sub-document was introduced with Oak 1.8 and is 
not present
+// in older versions. The branch commit revision is added to _bc 
whenever a
+// change is done on a document with a branch commit. This helps 
the
+// DocumentNodeStore to more easily identify branch commit 
changes."
+// The current implementation of 
"collectUnmergedBranchCommitDocument" only
+// supports branch commits that are created after Oak 1.8
+for (Revision bcRevision : localBranchCommits) {
+if (!isRevisionOlderThan(bcRevision, toModifiedMillis)) {
+// only even consider revisions that are older than the 
provided
+// timestamp - otherwise skip this
+continue;
+}
+final String commitValue = 
nodeStore.getCommitValue(bcRevision, doc);
+if (isCommitted(commitValue)) {
+// obviously don't do anything with merged (committed) 
branch commits
+continue;
+}
+removeUnmergedBCRevision(bcRevision, doc, updateOp);
+}
+// now for any of the handled system properties (the normal 
properties would
+// already be cleaned up by cleanupDeletedProperties), the 
resulting
+// subdocument could in theory become empty after removing all 
unmerged branch
+// commit revisions is done later.
+// so we need to go through all of them and check if we'd have 
removed
+// the entirety - and then, instead of individually remove 
revisions, just
+// delete the entire property.
+if (updateOp.hasChanges()) {
+for (Entry e : 
getSystemRemoveMapEntryCounts(updateOp)
+.entrySet()) {
+final String prop = e.getKey();
+final Object d = doc.data.get(prop);
+if (!(d instanceof Map)) {
+// unexpected and would likely indicate a bug, hence 
log.error
+log.error(
+"collectUnmergedBranchCommitDocument: property 
without subdocument as expected. id={}, prop={}",
+doc.getId(), prop);
+continue;
+}
+@SuppressWarnings("rawtypes")
+final Map m = (Map) d;
+if (m.size() != e.getValue()) {
+// then we're not removing all revisions - so cannot 
cleanup
+continue;
+}
+// then we're removing all revisions - so replace those 
REMOVE_MAP_ENTRY
+// with one whole remove(prop)
+final Iterator> it = 
updateOp.getChanges().entrySet()
+.iterator();
+while (it.hasNext()) {
+if (it.next().getKey().getName().equals(prop)) {
+it.remove();
+}
+}
+updateOp.remove(prop);
+}

Review Comment:
   ```suggestion
   getSystemRemoveMapEntryCounts(updateOp)
   .entrySet().stream()
   .filter(e -> filterEmptyProps(doc, e.getKey(), 
e.getValue()))
   .forEach(e -> {
 

[GitHub] [jackrabbit-oak] rishabhdaim commented on a diff in pull request #1090: OAK-8646 : Clean up changes from orphaned branch commits

2023-09-04 Thread via GitHub


rishabhdaim commented on code in PR #1090:
URL: https://github.com/apache/jackrabbit-oak/pull/1090#discussion_r1314935954


##
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java:
##
@@ -902,6 +905,206 @@ private void collectDeletedProperties(final NodeDocument 
doc, final GCPhases pha
 }
 }
 
+private void collectUnmergedBranchCommitDocument(final NodeDocument 
doc,
+long toModifiedMillis, final GCPhases phases, final UpdateOp 
updateOp) {
+if (!phases.start(GCPhase.DETAILED_GC_COLLECT_UNMERGED_BC)) {
+// GC was cancelled, stop
+return;
+}
+
+// from
+// 
https://jackrabbit.apache.org/oak/docs/nodestore/documentmk.html#previous-documents
+// "branch commits are not moved to previous documents until the 
branch is
+// merged."
+// i.e. if we're looking for unmerged branch commits, they cannot 
be in
+// previous documents, they have to be in the main one - hence we 
have to use
+// getLocalBranchCommits here
+final Set localBranchCommits = 
doc.getLocalBranchCommits();

Review Comment:
   I would compare after filtering the newer & commit branch commits.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1097: OAK-10426: oak-segment-azure: enable baseline check

2023-09-04 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg opened a new pull request, #1098: OAK-10427: Clear cache on NodeDocumentCache close

2023-09-04 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg opened a new pull request, #1099: OAK-10413: DocumentStoreIndexerIT hanging

2023-09-04 Thread via GitHub


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

   Release resources held by Persistence


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] nfsantos commented on a diff in pull request #1042: OAK-10358 - Filter by path on MongoDB query when downloading repository in Indexing job

2023-09-06 Thread via GitHub


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


##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/pipelined/PipelinedMongoDownloadTask.java:
##
@@ -225,12 +282,96 @@ private void downloadRange(DownloadRange range) throws 
InterruptedException, Tim
 download(mongoIterable);
 }
 
-private void downloadAll() throws InterruptedException, TimeoutException {
-LOG.info("Traversing all documents");
-FindIterable mongoIterable = dbCollection
-.withReadPreference(readPreference)
-.find();
-download(mongoIterable);
+private void downloadWithNaturalOrdering() throws InterruptedException, 
TimeoutException {
+// We are downloading potentially a large fraction of the repository, 
so using an index scan will be
+// inefficient. So we pass the natural hint to force MongoDB to use 
natural ordering, that is, column scan
+String regexBasePath = getPathForRegexFiltering();
+if (regexBasePath == null) {
+LOG.info("Downloading full repository using natural order");
+FindIterable mongoIterable = dbCollection
+.withReadPreference(readPreference)
+.find()
+.hint(NATURAL_HINT);
+download(mongoIterable);
+
+} else {
+Bson ancestorQuery = ancestorsFilter(regexBasePath);
+// Do not use natural order to download ancestors. The number of 
ancestors will always be small, likely less
+// than 10, so let MongoDB use an index to find them.
+LOG.info("Downloading using regex path filtering. Downloading 
ancestors: {}.", ancestorQuery);
+FindIterable ancestorsIterable = dbCollection
+.withReadPreference(readPreference)
+.find(ancestorQuery);
+download(ancestorsIterable);
+
+Bson childrenQuery = childrenFilter(regexBasePath);
+LOG.info("Downloading using regex path filtering. Downloading 
children: {}.", childrenQuery);
+FindIterable childrenIterable = dbCollection
+.withReadPreference(readPreference)
+.find(childrenQuery)
+.hint(NATURAL_HINT);
+download(childrenIterable);
+}
+}
+
+private String getPathForRegexFiltering() {
+if (!regexPathFiltering) {
+LOG.info("Regex path filtering disabled.");
+return null;
+}
+return getSingleIncludedPath(pathFilters);
+}
+
+// Package private for testing
+static String getSingleIncludedPath(List pathFilters) {
+// For the time being, we only enable path filtering if there is a 
single include path across all indexes and no
+// exclude paths. This is the case for most of the larger indexes. We 
can consider generalizing this in the future.
+LOG.info("Creating regex filter from pathFilters: " + pathFilters);
+if (pathFilters == null) {
+return null;
+}
+Set includedPaths = pathFilters.stream()
+.flatMap(pathFilter -> pathFilter.getIncludedPaths().stream())
+.collect(Collectors.toSet());
+
+Set excludedPaths = pathFilters.stream()
+.flatMap(pathFilter -> pathFilter.getExcludedPaths().stream())
+.collect(Collectors.toSet());
+
+if (excludedPaths.isEmpty() && includedPaths.size() == 1) {
+return includedPaths.stream().iterator().next();
+} else {
+return null;
+}
+}
+
+private static Bson childrenFilter(String path) {
+if (!path.endsWith("/")) {
+path = path + "/";
+}
+String quotedPath = Pattern.quote(path);
+// For entries with path sizes above a certain threshold, the _id 
field contains a hash instead of the path of
+// the entry. The path is stored instead in the _path field. 
Therefore, we have to include in the filter also
+// the documents with matching _path.
+return Filters.or(
+regex(NodeDocument.ID, Pattern.compile("^[0-9]{1,3}:" + 
quotedPath + ".*$")),
+regex(NodeDocument.PATH, Pattern.compile(quotedPath + ".*$"))
+);
+}
+
+private static Bson ancestorsFilter(String path) {

Review Comment:
   Good point. I added a test and code to handle the case where the path used 
for filtering is long enough to be handled as a long path: 
2ae36bdea6ae2552d3610c45bcb1e406e703b353
   
   I expect that this will never happen in practice, as it would mean that one 
of the `includePaths` is extremely long, but we should guard against it.



-- 
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 

[GitHub] [jackrabbit-oak] nit0906 commented on a diff in pull request #1101: OAK-10429: Implementation for IncrementalFFS

2023-09-06 Thread via GitHub


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


##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/DocumentStoreIndexerBase.java:
##
@@ -206,6 +208,26 @@ private List 
buildFlatFileStoreList(NodeState checkpointedState,
 return storeList;
 }
 
+private IncrementalStore buildIncrementalStore(String initialCheckpoint, 
String finalCheckpoint, Predicate pathPredicate, Set 
preferredPathElements) throws IOException {
+IncrementalStoreBuilder builder = null;
+IncrementalStore incrementalStore = null;
+Stopwatch flatFileStoreWatch = Stopwatch.createStarted();
+MemoryManager memoryManager = new DefaultMemoryManager();
+try {
+builder = new IncrementalStoreBuilder(indexHelper.getWorkDir(), 
memoryManager, indexHelper)
+.withPreferredPathElements(preferredPathElements)
+.withPathPredicate(pathPredicate)
+.withInitialCheckpoint(initialCheckpoint)
+.withFinalCheckpoint(finalCheckpoint);
+incrementalStore = builder.build();
+closer.register(incrementalStore);
+} catch (Exception e) {
+throw new IOException("Could not build flat file store", e);
+}
+log.info("Completed the flat file store build in {}", 
flatFileStoreWatch);

Review Comment:
   the log message can be changed a bit to denote this is incremental FFS 



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] nit0906 commented on a diff in pull request #1101: OAK-10429: Implementation for IncrementalFFS

2023-09-06 Thread via GitHub


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


##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/incrementalstore/DeltaFFSEditor.java:
##
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.index.indexer.document.incrementalstore;
+
+import org.apache.jackrabbit.oak.api.CommitFailedException;
+import org.apache.jackrabbit.oak.api.PropertyState;
+import 
org.apache.jackrabbit.oak.index.indexer.document.flatfile.NodeStateEntryWriter;
+import 
org.apache.jackrabbit.oak.index.indexer.document.incrementalstore.IncrementalFlatFileStoreStrategy;
+import org.apache.jackrabbit.oak.plugins.document.DocumentNodeState;
+import org.apache.jackrabbit.oak.spi.commit.Editor;
+import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.spi.state.NodeStateUtils;
+import org.jetbrains.annotations.Nullable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedWriter;
+import java.util.function.Predicate;
+
+import static com.google.common.base.StandardSystemProperty.LINE_SEPARATOR;
+
+public class DeltaFFSEditor implements Editor {
+
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final BufferedWriter w;
+private final NodeStateEntryWriter entryWriter;
+private final Predicate predicate;
+private final IncrementalFlatFileStoreStrategy 
incrementalFlatFileStoreStrategy;
+private static final int LINE_SEP_LENGTH = LINE_SEPARATOR.value().length();
+
+public DeltaFFSEditor(BufferedWriter w, NodeStateEntryWriter entryWriter, 
Predicate predicate, IncrementalFlatFileStoreStrategy 
incrementalFlatFileStoreStrategy) {
+this.w = w;
+this.entryWriter = entryWriter;
+this.predicate = predicate;
+this.incrementalFlatFileStoreStrategy = 
incrementalFlatFileStoreStrategy;
+}
+
+@Override
+public void enter(NodeState before, NodeState after) throws 
CommitFailedException {
+}
+
+@Override
+public void leave(NodeState before, NodeState after) throws 
CommitFailedException {
+}
+
+@Override
+public void propertyAdded(PropertyState after) throws 
CommitFailedException {
+}
+
+@Override
+public void propertyChanged(PropertyState before, PropertyState after) 
throws CommitFailedException {
+}
+
+@Override
+public void propertyDeleted(PropertyState before) throws 
CommitFailedException {
+}
+
+@Override
+public @Nullable Editor childNodeAdded(String name, NodeState after) 
throws CommitFailedException {
+writeToFile(after, IncrementalOperand.ADD);
+return this;
+}
+
+@Override
+public @Nullable Editor childNodeChanged(String name, NodeState before, 
NodeState after) throws CommitFailedException {
+writeToFile(after, IncrementalOperand.MODIFY);
+return this;
+}
+
+@Override
+public @Nullable Editor childNodeDeleted(String name, NodeState before) 
throws CommitFailedException {
+writeToFile(before, IncrementalOperand.DELETE);
+return this;
+}
+
+private String getPath(NodeState e) {
+String path;
+if (e instanceof DocumentNodeState) {
+path = ((DocumentNodeState)e).getPath().toString();
+} else {
+log.error("DeltaFFSEditor implementation is only for 
DocumentNodeState");
+throw new RuntimeException("DeltaFFSEditor implementation is only 
for DocumentNodeState");
+}
+return path;
+}
+
+private void writeToFile(NodeState e, IncrementalOperand action) {
+try {
+String path = getPath(e);
+if (!NodeStateUtils.isHiddenPath(path) && predicate.test(path)) {
+String line =  path + "|" + entryWriter.asJson(e) + "|" + 
action;
+w.append(line);
+w.newLine();
+incrementalFlatFileStoreStrategy.incrementEntryCount();
+
incrementalFlatFileStoreStrategy.setTextSize(incrementalFlatFileStoreStrategy.getTextSize()
 + line.length() + LINE_SEP_LENGTH);

[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1105: OAK-10371: oak-segment-azure/oak-blob-cloud-azure require provided Guava, embed it instead

2023-09-06 Thread via GitHub


sonarcloud[bot] commented on PR #1105:
URL: https://github.com/apache/jackrabbit-oak/pull/1105#issuecomment-1708178963

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=coverage=list)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20) you have used to run this analysis is 
deprecated and we will stop accepting it soon. Please update to at least Java 
17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1105: OAK-10371: oak-segment-azure/oak-blob-cloud-azure require provided Guava, embed it instead

2023-09-06 Thread via GitHub


sonarcloud[bot] commented on PR #1105:
URL: https://github.com/apache/jackrabbit-oak/pull/1105#issuecomment-1708180300

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=coverage=list)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20) you have used to run this analysis is 
deprecated and we will stop accepting it soon. Please update to at least Java 
17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] nfsantos commented on a diff in pull request #1042: OAK-10358 - Filter by path on MongoDB query when downloading repository in Indexing job

2023-09-06 Thread via GitHub


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


##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/pipelined/PipelinedMongoDownloadTask.java:
##
@@ -215,8 +190,90 @@ private void reportProgress(String id) {
 traversalLog.trace(id);
 }
 
-private void downloadRange(DownloadRange range) throws 
InterruptedException, TimeoutException {
-BsonDocument findQuery = range.getFindQuery();
+
+private void downloadWithRetryOnConnectionErrors() throws 
InterruptedException, TimeoutException {
+// If regex filtering is enabled, start by downloading the ancestors 
of the path used for filtering.
+// That is, download "/", "/content", "/content/dam" for a base path 
of "/content/dam". These nodes will not be
+// matched by the regex used in the Mongo query, which assumes a 
prefix of "???:/content/dam"
+Bson childrenFilter = null;
+String regexBasePath = getPathForRegexFiltering();
+if (regexBasePath != null) {
+// Regex path filtering is enabled
+// Download the ancestors in a separate query. No retrials done on 
this query, as it will take only a few
+// seconds and is done at the start of the job, so if it fails, 
the job can be retried without losing much work
+LOG.info("Using regex filtering with path {}", regexBasePath);
+Bson ancestorsQuery = ancestorsFilter(regexBasePath);
+LOG.info("Downloading ancestors of {}", regexBasePath);
+// Let Mongo decide which index to use for this query, it will 
return very few documents
+FindIterable mongoIterable = dbCollection
+.withReadPreference(readPreference)
+.find(ancestorsQuery);
+download(mongoIterable);
+// Filter to apply to the main query
+childrenFilter = childrenFilter(regexBasePath);
+}
+
+Instant failuresStartTimestamp = null; // When the last series of 
failures started
+long retryIntervalMs = retryInitialIntervalMillis;
+int numberOfFailures = 0;
+boolean downloadCompleted = false;
+Map exceptions = new HashMap<>();
+this.nextLastModified = 0;
+this.lastIdDownloaded = null;
+while (!downloadCompleted) {
+try {
+if (lastIdDownloaded != null) {
+LOG.info("Recovering from broken connection, finishing 
downloading documents with _modified={}", nextLastModified);
+downloadRange(new DownloadRange(nextLastModified, 
nextLastModified + 1, lastIdDownloaded), childrenFilter);
+// We have managed to reconnect, reset the failure 
timestamp
+failuresStartTimestamp = null;
+numberOfFailures = 0;
+// Continue downloading everything starting from the next 
_lastmodified value
+downloadRange(new DownloadRange(nextLastModified + 1, 
Long.MAX_VALUE, null), childrenFilter);
+} else {
+downloadRange(new DownloadRange(nextLastModified, 
Long.MAX_VALUE, null), childrenFilter);
+}
+downloadCompleted = true;
+} catch (MongoException e) {
+if (e instanceof MongoInterruptedException || e instanceof 
MongoIncompatibleDriverException) {
+// Non-recoverable exceptions
+throw e;
+}
+if (failuresStartTimestamp == null) {
+failuresStartTimestamp = 
Instant.now().truncatedTo(ChronoUnit.SECONDS);
+}
+LOG.warn("Connection error downloading from MongoDB.", e);
+long secondsSinceStartOfFailures = 
Duration.between(failuresStartTimestamp, Instant.now()).toSeconds();
+if (secondsSinceStartOfFailures > retryDuringSeconds) {
+// Give up. Get a string of all exceptions that were thrown
+StringBuilder summary = new StringBuilder();
+for (Map.Entry entry : 
exceptions.entrySet()) {
+
summary.append("\n\t").append(entry.getValue()).append("x: 
").append(entry.getKey());
+}
+throw new RetryException(retryDuringSeconds, 
summary.toString(), e);
+} else {
+numberOfFailures++;
+LOG.warn("Retrying download in {} ms; number of times 
failed: {}; current series of failures started at: {} ({} seconds ago)",
+retryIntervalMs, numberOfFailures, 
failuresStartTimestamp, secondsSinceStartOfFailures);
+exceptions.compute(e.getClass().getSimpleName() + " - " + 
e.getMessage(),
+(key, val) -> val == null ? 1 : val + 

[GitHub] [jackrabbit-oak] thomasmueller commented on a diff in pull request #1094: OAK-10424 add support for INSECURE RESULT SIZE and INSECURE FACETS query options and rep:insecureQueryOptions privile

2023-09-06 Thread via GitHub


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


##
oak-core/src/main/java/org/apache/jackrabbit/oak/query/SQL2Parser.java:
##
@@ -234,6 +249,28 @@ public Query parse(final String query, final boolean 
initialise) throws ParseExc
 
 return q;
 }
+
+/**
+ * Checks the InsecureQueryOptionsMode for the values ALLOW or DENY. If 
allowed, the method returns true,
+ * indicating that insecure options should be returned by the parser. If 
denied, a ParseException is thrown.
+ * For all other modes, the method returns false, indicating that this 
option should be ignored.
+ *
+ * @return true if the mode is ALLOW, false otherwise
+ * @throws ParseException if the mode is DENY
+ */
+private boolean allowsInsecureOptions() throws ParseException {

Review Comment:
   I think checking (and throwing the exception) need to happen at execution 
time, not while parsing.



##
oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryOptions.java:
##
@@ -106,6 +110,14 @@ public QueryOptions(QueryOptions defaultValues) {
 t.read(']');
 prefetch = list;
 }
+x = map.get("insecureResultSize");
+if (x != null) {

Review Comment:
   I think the following should work:
   
   insecureResultSize = Boolean.parseBoolean(map.get("insecureResultSize"))



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke commented on pull request #1105: OAK-10371: oak-segment-azure/oak-blob-cloud-azure require provided Guava, embed it instead

2023-09-06 Thread via GitHub


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

   running ITs locally; will merge on success
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1105: OAK-10371: oak-segment-azure/oak-blob-cloud-azure require provided Guava, embed it instead

2023-09-06 Thread via GitHub


sonarcloud[bot] commented on PR #1105:
URL: https://github.com/apache/jackrabbit-oak/pull/1105#issuecomment-1708106617

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=coverage=list)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20) you have used to run this analysis is 
deprecated and we will stop accepting it soon. Please update to at least Java 
17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1105: OAK-10371: oak-segment-azure/oak-blob-cloud-azure require provided Guava, embed it instead

2023-09-06 Thread via GitHub


sonarcloud[bot] commented on PR #1105:
URL: https://github.com/apache/jackrabbit-oak/pull/1105#issuecomment-1708159161

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=coverage=list)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1105=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20) you have used to run this analysis is 
deprecated and we will stop accepting it soon. Please update to at least Java 
17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1105: OAK-10371: oak-segment-azure/oak-blob-cloud-azure require provided Guava, embed it instead

2023-09-06 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] rishabhdaim commented on pull request #1098: OAK-10427: Clear cache on NodeDocumentCache close

2023-09-04 Thread via GitHub


rishabhdaim commented on PR #1098:
URL: https://github.com/apache/jackrabbit-oak/pull/1098#issuecomment-1705967976

   We need to close `changeTrackers` as well.


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg merged pull request #1098: OAK-10427: Clear cache on NodeDocumentCache close

2023-09-05 Thread via GitHub


mreutegg merged PR #1098:
URL: https://github.com/apache/jackrabbit-oak/pull/1098


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke merged pull request #1097: OAK-10426: oak-segment-azure: enable baseline check

2023-09-05 Thread via GitHub


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


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg commented on pull request #1098: OAK-10427: Clear cache on NodeDocumentCache close

2023-09-05 Thread via GitHub


mreutegg commented on PR #1098:
URL: https://github.com/apache/jackrabbit-oak/pull/1098#issuecomment-1706012216

   > We need to close changeTrackers as well.
   
   That list only contains entries when trackers are in use. This is only the 
case during some DocumentStore operations, which means the list should 
generally be small or even empty. I'd rather not make changes, unless we know 
there is a problem.


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg commented on pull request #1099: OAK-10413: DocumentStoreIndexerIT hanging

2023-09-05 Thread via GitHub


mreutegg commented on PR #1099:
URL: https://github.com/apache/jackrabbit-oak/pull/1099#issuecomment-1706209961

   > Shouldn't we also need to delete the folders created by createFolders().
   
   No. These are created via the JUnit Rule `TemporaryFolder` and automatically 
deleted at the end of the test.


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg commented on a diff in pull request #293: OAK-9436 clean transient session storage after exceptions during import

2023-09-05 Thread via GitHub


mreutegg commented on code in PR #293:
URL: https://github.com/apache/jackrabbit-oak/pull/293#discussion_r1315662326


##
oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/ImporterImpl.java:
##
@@ -336,138 +339,150 @@ public void startNode(@NotNull NodeInfo nodeInfo, 
@NotNull List propIn
 throws RepositoryException {
 Tree parent = parents.peek();
 Tree tree = null;
-String id = nodeInfo.getUUID();
-String nodeName = nodeInfo.getName();
-String ntName = nodeInfo.getPrimaryTypeName();
-
-if (parent == null) {
-log.debug("Skipping node: {}", nodeName);
-// parent node was skipped, skip this child node too
-parents.push(null); // push null onto stack for skipped node
-// notify the p-i-importer
-if (pnImporter != null) {
-pnImporter.startChildInfo(nodeInfo, propInfos);
-}
-return;
-}
-
-NodeDefinition parentDef = getDefinition(parent);
-if (parentDef.isProtected()) {
-// skip protected node
-parents.push(null);
-log.debug("Skipping protected node: {}", nodeName);
-
-if (pnImporter != null) {
-// pnImporter was already started (current nodeInfo is a 
sibling)
-// notify it about this child node.
-pnImporter.startChildInfo(nodeInfo, propInfos);
-} else {
-// no importer defined yet:
-// test if there is a ProtectedNodeImporter among the 
configured
-// importers that can handle this.
-// if there is one, notify the ProtectedNodeImporter about the
-// start of a item tree that is protected by this parent. If it
-// potentially is able to deal with it, notify it about the 
child node.
-for (ProtectedNodeImporter pni : getNodeImporters()) {
-if (pni.start(parent)) {
-log.debug("Protected node -> delegated to 
ProtectedNodeImporter");
-pnImporter = pni;
-pnImporter.startChildInfo(nodeInfo, propInfos);
-break;
-} /* else: p-i-Importer isn't able to deal with the 
protected tree.
- try next. and if none can handle the passed parent the
- tree below will be skipped */
+try {
+String id = nodeInfo.getUUID();
+String nodeName = nodeInfo.getName();
+String ntName = nodeInfo.getPrimaryTypeName();
+
+if (parent == null) {
+log.debug("Skipping node: {}", nodeName);
+// parent node was skipped, skip this child node too
+parents.push(null); // push null onto stack for skipped node
+// notify the p-i-importer
+if (pnImporter != null) {
+pnImporter.startChildInfo(nodeInfo, propInfos);
 }
+return;
 }
-return;
-}
 
-if (parent.hasChild(nodeName)) {
-// a node with that name already exists...
-Tree existing = parent.getChild(nodeName);
-NodeDefinition def = getDefinition(existing);
-if (!def.allowsSameNameSiblings()) {
-// existing doesn't allow same-name siblings,
-// check for potential conflicts
-if (def.isProtected() && isNodeType(existing, ntName)) {
-/*
- use the existing node as parent for the possible 
subsequent
- import of a protected tree, that the protected node 
importer
- may or may not be able to deal with.
- -> upon the next 'startNode' the check for the parent 
being
-protected will notify the protected node importer.
- -> if the importer is able to deal with that node it needs
-to care of the complete subtree until it is notified
-during the 'endNode' call.
- -> if the import can't deal with that node or if that node
-is the a leaf in the tree to be imported 'end' will
-not have an effect on the importer, that was never 
started.
-*/
-log.debug("Skipping protected node: {}", existing);
-parents.push(existing);
-/**
- * let ProtectedPropertyImporters handle the properties
- * associated with the imported node. this may include 
overwriting,
- * merging or just adding missing properties.
- */
-importProperties(existing, propInfos, true);
-return;
- 

[GitHub] [jackrabbit-oak] mreutegg commented on a diff in pull request #293: OAK-9436 clean transient session storage after exceptions during import

2023-09-05 Thread via GitHub


mreutegg commented on code in PR #293:
URL: https://github.com/apache/jackrabbit-oak/pull/293#discussion_r1315662326


##
oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/ImporterImpl.java:
##
@@ -336,138 +339,150 @@ public void startNode(@NotNull NodeInfo nodeInfo, 
@NotNull List propIn
 throws RepositoryException {
 Tree parent = parents.peek();
 Tree tree = null;
-String id = nodeInfo.getUUID();
-String nodeName = nodeInfo.getName();
-String ntName = nodeInfo.getPrimaryTypeName();
-
-if (parent == null) {
-log.debug("Skipping node: {}", nodeName);
-// parent node was skipped, skip this child node too
-parents.push(null); // push null onto stack for skipped node
-// notify the p-i-importer
-if (pnImporter != null) {
-pnImporter.startChildInfo(nodeInfo, propInfos);
-}
-return;
-}
-
-NodeDefinition parentDef = getDefinition(parent);
-if (parentDef.isProtected()) {
-// skip protected node
-parents.push(null);
-log.debug("Skipping protected node: {}", nodeName);
-
-if (pnImporter != null) {
-// pnImporter was already started (current nodeInfo is a 
sibling)
-// notify it about this child node.
-pnImporter.startChildInfo(nodeInfo, propInfos);
-} else {
-// no importer defined yet:
-// test if there is a ProtectedNodeImporter among the 
configured
-// importers that can handle this.
-// if there is one, notify the ProtectedNodeImporter about the
-// start of a item tree that is protected by this parent. If it
-// potentially is able to deal with it, notify it about the 
child node.
-for (ProtectedNodeImporter pni : getNodeImporters()) {
-if (pni.start(parent)) {
-log.debug("Protected node -> delegated to 
ProtectedNodeImporter");
-pnImporter = pni;
-pnImporter.startChildInfo(nodeInfo, propInfos);
-break;
-} /* else: p-i-Importer isn't able to deal with the 
protected tree.
- try next. and if none can handle the passed parent the
- tree below will be skipped */
+try {
+String id = nodeInfo.getUUID();
+String nodeName = nodeInfo.getName();
+String ntName = nodeInfo.getPrimaryTypeName();
+
+if (parent == null) {
+log.debug("Skipping node: {}", nodeName);
+// parent node was skipped, skip this child node too
+parents.push(null); // push null onto stack for skipped node
+// notify the p-i-importer
+if (pnImporter != null) {
+pnImporter.startChildInfo(nodeInfo, propInfos);
 }
+return;
 }
-return;
-}
 
-if (parent.hasChild(nodeName)) {
-// a node with that name already exists...
-Tree existing = parent.getChild(nodeName);
-NodeDefinition def = getDefinition(existing);
-if (!def.allowsSameNameSiblings()) {
-// existing doesn't allow same-name siblings,
-// check for potential conflicts
-if (def.isProtected() && isNodeType(existing, ntName)) {
-/*
- use the existing node as parent for the possible 
subsequent
- import of a protected tree, that the protected node 
importer
- may or may not be able to deal with.
- -> upon the next 'startNode' the check for the parent 
being
-protected will notify the protected node importer.
- -> if the importer is able to deal with that node it needs
-to care of the complete subtree until it is notified
-during the 'endNode' call.
- -> if the import can't deal with that node or if that node
-is the a leaf in the tree to be imported 'end' will
-not have an effect on the importer, that was never 
started.
-*/
-log.debug("Skipping protected node: {}", existing);
-parents.push(existing);
-/**
- * let ProtectedPropertyImporters handle the properties
- * associated with the imported node. this may include 
overwriting,
- * merging or just adding missing properties.
- */
-importProperties(existing, propInfos, true);
-return;
- 

[GitHub] [jackrabbit-oak] tihom88 opened a new pull request, #1101: OAK-10429: Implementation for IncrementalFFS

2023-09-05 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg commented on pull request #1099: OAK-10413: DocumentStoreIndexerIT hanging

2023-09-05 Thread via GitHub


mreutegg commented on PR #1099:
URL: https://github.com/apache/jackrabbit-oak/pull/1099#issuecomment-1706252823

   Strange, now DocumentStoreIndexerIT showed a failure.
   ```
   [ERROR] Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
90.811 s <<< FAILURE! - in 
org.apache.jackrabbit.oak.index.DocumentStoreIndexerIT
   [ERROR] 
parallelReindexWithLZ4(org.apache.jackrabbit.oak.index.DocumentStoreIndexerIT)  
Time elapsed: 24.515 s  <<< FAILURE!
   java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:87)
at org.junit.Assert.assertTrue(Assert.java:42)
at org.junit.Assert.assertFalse(Assert.java:65)
at org.junit.Assert.assertFalse(Assert.java:75)
at 
org.apache.jackrabbit.oak.index.DocumentStoreIndexerIT.parallelReindexInternal(DocumentStoreIndexerIT.java:265)
at 
org.apache.jackrabbit.oak.index.DocumentStoreIndexerIT.parallelReindexWithLZ4(DocumentStoreIndexerIT.java:184)
   ```
   I'm not able to reproduce this on my machine. Maybe flaky? I'll update the 
branch to trigger a new build.
   
   @tihom88, WDYT?


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1102: OAK-10430: oak-*-azure: add to OSGi tests

2023-09-05 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] amit-jain merged pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-10 Thread via GitHub


amit-jain merged PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] amit-jain commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


amit-jain commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318318315


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {

Review Comment:
   `checkTruncateLength` is meant to be `checkAndTruncate` and I removd And for 
brevity. So, maybe `checkAndTruncateLength` if its more clearer



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] steffenvan commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


steffenvan commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318352601


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {
+log.trace("Property {} at path:[{}] has value {}", prop, path, value);
+
+BytesRef ref = new BytesRef(value);
+if (ref.length <= maxLength) {
+return ref;
+}
+log.info("Truncating property {} at path:[{}] as length after encoding 
{} is > {} ",
+prop, path, ref.length, maxLength);
+int end = maxLength - 1;
+// skip over tails of utf-8 multi-byte sequences (up to 3 bytes)
+while ((ref.bytes[end] & 0b1100) == 0b1000) {
+end--;
+}
+// remove one head of a utf-8 multi-byte sequence (at most 1)
+if ((ref.bytes[end] & 0b1100) == 0b1100) {
+end--;
+}
+byte[] bytes2 = Arrays.copyOf(ref.bytes, end + 1);
+String truncated = new String(bytes2, StandardCharsets.UTF_8);
+ref = new BytesRef(truncated);
+log.trace("Truncated property {} at path:[{}] to {}", prop, path, 
ref.utf8ToString());
+while (ref.length > maxLength) {

Review Comment:
   I think it's important to document this "emergency" even more. When can it 
happen, what do we do to fix it, and why is it okay for us to fix it the way we 
are. From a quick glance at the code, it is not immediately clear why this 
works. 
   
   Specifically, one or more clear examples would make it very clear imo. 



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] steffenvan commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


steffenvan commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318274102


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {

Review Comment:
   Could we change the name of the function to `truncateToMaxLength`, 
`getTruncatedBytesRef` something like that? IMO `checkTruncateLength` suggests 
that the function might just be verifying something rather than actually 
performing a truncation operation.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] steffenvan commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


steffenvan commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318377448


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {

Review Comment:
   I think the function does quite a lot of things - and I generally like our 
code to follow the SRP. Some minor refactoring can lead to this, which IMO is a 
bit clearer: 
   
   ```java
   // TODO: explain why we use 10
   private static final int EMERGENCY_TRUNCATION_LENGTH = 10;
   ...
   // assuming we rename checkTruncateLength() -> truncateToMaxLength()
   protected static BytesRef truncateToMaxLength(String prop, String value, 
String path, int maxLength) {
   log.trace("Property {} at path:[{}] has value {}", prop, path, value);
   
   BytesRef ref = new BytesRef(value);
   if (ref.length <= maxLength) {
   return ref;
   }
   
   ref = truncateBytesRef(ref, maxLength);
   
   if (ref.length > maxLength) {
   ref = emergencyTruncate(ref, maxLength);
   }
   
   return ref;
   }
   
   private static BytesRef truncateBytesRef(BytesRef ref, int maxLength) {
   log.info("Truncating as length after encoding {} is > {} ", ref.length, 
maxLength);
   
   int end = calculateEndPosition(ref, maxLength);
   byte[] truncatedBytes = Arrays.copyOf(ref.bytes, end + 1);
   
   BytesRef truncatedRef = new BytesRef(new String(truncatedBytes, 
StandardCharsets.UTF_8));
   log.trace("Truncated to {}", truncatedRef.utf8ToString());
   
   return truncatedRef;
   }
   
   // TODO: explain this more in detail, with examples and why it's necessary. 
   private static int calculateEndPosition(BytesRef ref, int maxLength) {
   int end = maxLength - 1;
   
   while ((ref.bytes[end] & 0b1100) == 0b1000) {
   end--;
   }
   if ((ref.bytes[end] & 0b1100) == 0b1100) {
   end--;
   }
   
   return end;
   }
   
   // TODO: explain why this is necessary and with examples. 
   private static BytesRef emergencyTruncate(BytesRef ref, int maxLength) {
   log.error("Truncation did not work: still {} bytes", ref.length);
   String truncated = ref.utf8ToString();
   
   while (ref.length > maxLength) {
   truncated = truncated.substring(0, truncated.length() - 
EMERGENCY_TRUNCATION_LENGTH);
   ref = new BytesRef(truncated);
   }
   
   return ref;
   }
   ```



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] amit-jain commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


amit-jain commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318388488


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {

Review Comment:
   Hmm...I think this takes the refactoring too far and in fact makes 
readability harder. Generally  if there was a need for reuse for some of the 
sub methods it would have made sense. Explanation of the code can happen 
through documentation as well.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] amit-jain commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


amit-jain commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318389192


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {
+log.trace("Property {} at path:[{}] has value {}", prop, path, value);
+
+BytesRef ref = new BytesRef(value);
+if (ref.length <= maxLength) {
+return ref;
+}
+log.info("Truncating property {} at path:[{}] as length after encoding 
{} is > {} ",
+prop, path, ref.length, maxLength);
+int end = maxLength - 1;
+// skip over tails of utf-8 multi-byte sequences (up to 3 bytes)
+while ((ref.bytes[end] & 0b1100) == 0b1000) {
+end--;
+}
+// remove one head of a utf-8 multi-byte sequence (at most 1)
+if ((ref.bytes[end] & 0b1100) == 0b1100) {
+end--;
+}
+byte[] bytes2 = Arrays.copyOf(ref.bytes, end + 1);

Review Comment:
   Yes that makes sense.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] steffenvan commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


steffenvan commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318360063


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {
+log.trace("Property {} at path:[{}] has value {}", prop, path, value);
+
+BytesRef ref = new BytesRef(value);
+if (ref.length <= maxLength) {
+return ref;
+}
+log.info("Truncating property {} at path:[{}] as length after encoding 
{} is > {} ",
+prop, path, ref.length, maxLength);
+int end = maxLength - 1;
+// skip over tails of utf-8 multi-byte sequences (up to 3 bytes)
+while ((ref.bytes[end] & 0b1100) == 0b1000) {

Review Comment:
   Could we add examples of these skipping and removals of multi-byte 
sequences? And also add explanations for why they are necessary? 



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] steffenvan commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


steffenvan commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318335484


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {

Review Comment:
   Perhaps it would then be even clearer to split the function in two: one that 
truncates and the other checks? 



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] fabriziofortino commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


fabriziofortino commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318385118


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {
+log.trace("Property {} at path:[{}] has value {}", prop, path, value);
+
+BytesRef ref = new BytesRef(value);
+if (ref.length <= maxLength) {
+return ref;
+}
+log.info("Truncating property {} at path:[{}] as length after encoding 
{} is > {} ",
+prop, path, ref.length, maxLength);
+int end = maxLength - 1;
+// skip over tails of utf-8 multi-byte sequences (up to 3 bytes)
+while ((ref.bytes[end] & 0b1100) == 0b1000) {
+end--;
+}
+// remove one head of a utf-8 multi-byte sequence (at most 1)
+if ((ref.bytes[end] & 0b1100) == 0b1100) {
+end--;
+}
+byte[] bytes2 = Arrays.copyOf(ref.bytes, end + 1);

Review Comment:
   for clarity, I would use something like `truncatedBytes` instead of `bytes2`



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] steffenvan commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


steffenvan commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318352601


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {
+log.trace("Property {} at path:[{}] has value {}", prop, path, value);
+
+BytesRef ref = new BytesRef(value);
+if (ref.length <= maxLength) {
+return ref;
+}
+log.info("Truncating property {} at path:[{}] as length after encoding 
{} is > {} ",
+prop, path, ref.length, maxLength);
+int end = maxLength - 1;
+// skip over tails of utf-8 multi-byte sequences (up to 3 bytes)
+while ((ref.bytes[end] & 0b1100) == 0b1000) {
+end--;
+}
+// remove one head of a utf-8 multi-byte sequence (at most 1)
+if ((ref.bytes[end] & 0b1100) == 0b1100) {
+end--;
+}
+byte[] bytes2 = Arrays.copyOf(ref.bytes, end + 1);
+String truncated = new String(bytes2, StandardCharsets.UTF_8);
+ref = new BytesRef(truncated);
+log.trace("Truncated property {} at path:[{}] to {}", prop, path, 
ref.utf8ToString());
+while (ref.length > maxLength) {

Review Comment:
   I think it's important to document this "emergency" even more. When can it 
happen, what do we do to fix it, and why is it okay for us to fix it the way we 
are? From a quick glance at the code, it is not immediately clear why this 
works. 
   
   Specifically, one or more clear examples would make it very clear imo. 



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] amit-jain commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


amit-jain commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318385793


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {
+log.trace("Property {} at path:[{}] has value {}", prop, path, value);
+
+BytesRef ref = new BytesRef(value);
+if (ref.length <= maxLength) {
+return ref;
+}
+log.info("Truncating property {} at path:[{}] as length after encoding 
{} is > {} ",
+prop, path, ref.length, maxLength);
+int end = maxLength - 1;
+// skip over tails of utf-8 multi-byte sequences (up to 3 bytes)
+while ((ref.bytes[end] & 0b1100) == 0b1000) {
+end--;
+}
+// remove one head of a utf-8 multi-byte sequence (at most 1)
+if ((ref.bytes[end] & 0b1100) == 0b1100) {
+end--;
+}
+byte[] bytes2 = Arrays.copyOf(ref.bytes, end + 1);
+String truncated = new String(bytes2, StandardCharsets.UTF_8);
+ref = new BytesRef(truncated);
+log.trace("Truncated property {} at path:[{}] to {}", prop, path, 
ref.utf8ToString());
+while (ref.length > maxLength) {

Review Comment:
   As the original comment noted it should never happen but Thomas added for 
unforseen cases rather than just throeing an error. 



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] amit-jain commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


amit-jain commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318384289


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {
+log.trace("Property {} at path:[{}] has value {}", prop, path, value);
+
+BytesRef ref = new BytesRef(value);
+if (ref.length <= maxLength) {
+return ref;
+}
+log.info("Truncating property {} at path:[{}] as length after encoding 
{} is > {} ",
+prop, path, ref.length, maxLength);
+int end = maxLength - 1;
+// skip over tails of utf-8 multi-byte sequences (up to 3 bytes)
+while ((ref.bytes[end] & 0b1100) == 0b1000) {

Review Comment:
   There are tests available in LuceneLargeStringPropertyTest.java. Is tht not 
enough, maybe I can add a bit of documentation.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] amit-jain commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


amit-jain commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318318315


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {

Review Comment:
   `checkTruncateLength` is meant to be `checkAndTruncate` and I removd `And` 
for brevity. So, maybe `checkAndTruncateLength` if its more clearer



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] steffenvan commented on a diff in pull request #1071: OAK-10384: Fix stripping of large indexed ordered properties

2023-09-07 Thread via GitHub


steffenvan commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1318377448


##
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##
@@ -315,6 +313,38 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
 }
 return fieldAdded;
 }
+
+protected static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {

Review Comment:
   I think the function does quite a lot of things - and I generally like our 
code to follow the SRP. Some minor refactoring can lead to this, which IMO is a 
bit clearer. It is more code, but I think it's clearer - especially when we fix 
the TODOs for new people to read it.
   
   ```java
   // TODO: explain why we use 10
   private static final int EMERGENCY_TRUNCATION_LENGTH = 10;
   ...
   // assuming we rename checkTruncateLength() -> truncateToMaxLength()
   protected static BytesRef truncateToMaxLength(String prop, String value, 
String path, int maxLength) {
   log.trace("Property {} at path:[{}] has value {}", prop, path, value);
   
   BytesRef ref = new BytesRef(value);
   if (ref.length <= maxLength) {
   return ref;
   }
   
   ref = truncateBytesRef(ref, maxLength);
   
   if (ref.length > maxLength) {
   ref = emergencyTruncate(ref, maxLength);
   }
   
   return ref;
   }
   
   private static BytesRef truncateBytesRef(BytesRef ref, int maxLength) {
   log.info("Truncating as length after encoding {} is > {} ", ref.length, 
maxLength);
   
   int end = calculateEndPosition(ref, maxLength);
   byte[] truncatedBytes = Arrays.copyOf(ref.bytes, end + 1);
   
   BytesRef truncatedRef = new BytesRef(new String(truncatedBytes, 
StandardCharsets.UTF_8));
   log.trace("Truncated to {}", truncatedRef.utf8ToString());
   
   return truncatedRef;
   }
   
   // TODO: explain this more in detail, with examples and why it's necessary. 
   private static int calculateEndPosition(BytesRef ref, int maxLength) {
   int end = maxLength - 1;
   
   while ((ref.bytes[end] & 0b1100) == 0b1000) {
   end--;
   }
   if ((ref.bytes[end] & 0b1100) == 0b1100) {
   end--;
   }
   
   return end;
   }
   
   // TODO: explain why this is necessary and with examples. 
   private static BytesRef emergencyTruncate(BytesRef ref, int maxLength) {
   log.error("Truncation did not work: still {} bytes", ref.length);
   String truncated = ref.utf8ToString();
   
   while (ref.length > maxLength) {
   truncated = truncated.substring(0, truncated.length() - 
EMERGENCY_TRUNCATION_LENGTH);
   ref = new BytesRef(truncated);
   }
   
   return ref;
   }
   ```



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1112: OAK-6759: Convert oak-blob-cloud-azure to OSGi R6 annotations

2023-09-11 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] fabriziofortino merged pull request #1110: OAK-10441: exclude snakeyaml from oak-search-elastic

2023-09-11 Thread via GitHub


fabriziofortino merged PR #1110:
URL: https://github.com/apache/jackrabbit-oak/pull/1110


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1113: OAK-10043: refactor AbstractDataStoreService so that it doesn't need the statisticsProvider OSGi reference

2023-09-11 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1114: OAK-10440: Release Oak 1.22.17 - Candidate Release Notes

2023-09-11 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke merged pull request #1114: OAK-10440: Release Oak 1.22.17 - Candidate Release Notes

2023-09-11 Thread via GitHub


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


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1113: OAK-10043: refactor AbstractDataStoreService so that it doesn't need the statisticsProvider OSGi reference

2023-09-11 Thread via GitHub


sonarcloud[bot] commented on PR #1113:
URL: https://github.com/apache/jackrabbit-oak/pull/1113#issuecomment-1713824306

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=false=CODE_SMELL)
   
   
[![25.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png
 
'25.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=new_coverage=list)
 [25.0% 
Coverage](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1113=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20.1) you have used to run this analysis 
is deprecated and we will stop accepting it soon. Please update to at least 
Java 17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke merged pull request #1113: OAK-10043: refactor AbstractDataStoreService so that it doesn't need the statisticsProvider OSGi reference

2023-09-11 Thread via GitHub


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


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] nit0906 opened a new pull request, #1118: OAK-10442 | Fixing docs to reflect aggregation does not support node …

2023-09-13 Thread via GitHub


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

   …type inheritence.


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] adamcin commented on a diff in pull request #1094: OAK-10424 add support for INSECURE RESULT SIZE and INSECURE FACETS query options and rep:insecureQueryOptions privilege

2023-09-15 Thread via GitHub


adamcin commented on code in PR #1094:
URL: https://github.com/apache/jackrabbit-oak/pull/1094#discussion_r1327273737


##
oak-lucene/src/test/java/org/apache/jackrabbit/oak/jcr/query/ResultSizeTest.java:
##
@@ -126,5 +151,90 @@ private void doTestResultSize(boolean union, int expected) 
throws RepositoryExce
 System.clearProperty("oak.fastQuerySize");
 
 }
+
+private void doTestResultSizeOption(boolean aggregateAtQueryTime) throws 
RepositoryException {
+createData();
+int expectedForUnion = 400;
+int expectedForTwoConditions = aggregateAtQueryTime ? 400 : 200;
+doTestResultSizeOption(superuser, false, expectedForTwoConditions);
+doTestResultSizeOption(superuser, true, expectedForUnion);
+Session readOnlySession = null;
+try {
+readOnlySession = getHelper().getReadOnlySession();
+assertNotNull(readOnlySession);
+doTestResultSizeOption(readOnlySession, false, -1);
+doTestResultSizeOption(readOnlySession, true, -1);
+} finally {
+if (readOnlySession != null) {
+readOnlySession.logout();
+}
+}
+}
+
+private void doTestResultSizeOption(Session session, boolean union, int 
expected) throws RepositoryException {
+QueryManager qm = session.getWorkspace().getQueryManager();
+
+String statement;
+if (union) {
+statement = "select a.[jcr:path] from [nt:base] as a where 
contains(a.[text], 'Hello') UNION select a.[jcr:path] from [nt:base] as a where 
contains(a.[text], 'World')";
+} else {
+statement = "select a.[jcr:path] from [nt:base] as a where 
contains(a.[text], 'Hello World')";
+}
+
+Query q;
+long result;
+NodeIterator it;
+StringBuilder buff;
+
+// enabled by default now, in LuceneOakRepositoryStub. Disable global
+System.setProperty("oak.fastQuerySize", "false");
+
+// fast (insecure) case
+String fastSizeResult = "";
+q = qm.createQuery(statement + " option (insecure result size)", 
Query.JCR_SQL2);
+if (expected < 0) {
+// if expected < 0, i.e. insufficient permissions, expect a 
InvalidQueryException on execute().
+try {
+it = q.execute().getNodes();
+fail("expected an InvalidQueryException caused by a 
IllegalArgumentException");
+} catch (InvalidQueryException e) {
+assertTrue("expected an InvalidQueryException caused by a 
ParseException",
+e.getCause() instanceof IllegalArgumentException);
+}
+} else {
+it = q.execute().getNodes();
+result = it.getSize();
+assertTrue("size: " + result + " expected around " + expected,
+result > expected - 50 &&
+result < expected + 50);
+buff = new StringBuilder();
+while (it.hasNext()) {
+Node n = it.nextNode();
+buff.append(n.getPath()).append('\n');
+}
+fastSizeResult = buff.toString();
+q = qm.createQuery(statement + " option (insecure result size)", 
Query.JCR_SQL2);
+q.setLimit(90);
+it = q.execute().getNodes();
+assertEquals(90, it.getSize());
+}
+
+// default (secure) case
+q = qm.createQuery(statement, Query.JCR_SQL2);
+it = q.execute().getNodes();
+result = it.getSize();
+assertEquals(-1, result);
+buff = new StringBuilder();
+while (it.hasNext()) {
+Node n = it.nextNode();
+buff.append(n.getPath()).append('\n');
+}
+String regularResult = buff.toString();
+if (expected >= 0) {
+assertEquals(regularResult, fastSizeResult);
+}
+
+System.clearProperty("oak.fastQuerySize");

Review Comment:
   I used the try-finally approach since ResultSizeTest is still in pre-junit4 
style. Also modified the existing test method in the same way.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] kwin merged pull request #1121: OAK-10448 Convert o.a.j.api.security.user.Query back to ConsumerType

2023-09-15 Thread via GitHub


kwin merged PR #1121:
URL: https://github.com/apache/jackrabbit-oak/pull/1121


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1122: OAK-10434: oak-segment-azure/oak-blob-cloud-azure: update SDK dependencies

2023-09-15 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke merged pull request #1122: OAK-10434: oak-segment-azure/oak-blob-cloud-azure: update SDK dependencies

2023-09-15 Thread via GitHub


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


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1122: OAK-10434: oak-segment-azure/oak-blob-cloud-azure: update SDK dependencies

2023-09-15 Thread via GitHub


sonarcloud[bot] commented on PR #1122:
URL: https://github.com/apache/jackrabbit-oak/pull/1122#issuecomment-1721188712

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=coverage=list)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1122=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20.1) you have used to run this analysis 
is deprecated and we will stop accepting it soon. Please update to at least 
Java 17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1119: OAK-10446: Upgrade jackson-databind dependency to 2.15.2

2023-09-14 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke merged pull request #1120: OAK-10447: update Tomcat JDBC dependency to 9.0.80

2023-09-14 Thread via GitHub


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


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1119: OAK-10446: Upgrade jackson-databind dependency to 2.15.2

2023-09-14 Thread via GitHub


sonarcloud[bot] commented on PR #1119:
URL: https://github.com/apache/jackrabbit-oak/pull/1119#issuecomment-1719531947

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=coverage=list)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1119=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20.1) you have used to run this analysis 
is deprecated and we will stop accepting it soon. Please update to at least 
Java 17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke merged pull request #1119: OAK-10446: Upgrade jackson-databind dependency to 2.15.2

2023-09-14 Thread via GitHub


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


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1120: OAK-10447: update Tomcat JDBC dependency to 9.0.80

2023-09-14 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] tihom88 opened a new pull request, #1123: OAK-10429: Implementation for IncrementalFFS

2023-09-16 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] tihom88 closed pull request #1101: OAK-10429: Implementation for IncrementalFFS

2023-09-16 Thread via GitHub


tihom88 closed pull request #1101: OAK-10429: Implementation for IncrementalFFS
URL: https://github.com/apache/jackrabbit-oak/pull/1101


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] joerghoh merged pull request #1124: OAK-10445 downgrade INFO log message to DEBUG

2023-09-17 Thread via GitHub


joerghoh merged PR #1124:
URL: https://github.com/apache/jackrabbit-oak/pull/1124


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1124: OAK-10445 downgrade INFO log message to DEBUG

2023-09-17 Thread via GitHub


sonarcloud[bot] commented on PR #1124:
URL: https://github.com/apache/jackrabbit-oak/pull/1124#issuecomment-1722444793

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1124=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20.1) you have used to run this analysis 
is deprecated and we will stop accepting it soon. Please update to at least 
Java 17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] joerghoh opened a new pull request, #1124: OAK-10445 downgrade INFO log message to DEBUG

2023-09-17 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] mreutegg commented on a diff in pull request #1011: OAK-10334: Node.addMixin() may overwrite existing mixins

2023-08-24 Thread via GitHub


mreutegg commented on code in PR #1011:
URL: https://github.com/apache/jackrabbit-oak/pull/1011#discussion_r1304259012


##
oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/NodeImpl.java:
##
@@ -1015,6 +1015,9 @@ public void checkPreconditions() throws 
RepositoryException {
 throw new VersionException(format(
 "Cannot add mixin type. Node [%s] is checked in.", 
getNodePath()));
 }
+// OAK-10334: adding mixin requires permission to read 
existing mixin types
+PropertyState prop = 
PropertyStates.createProperty(JCR_MIXINTYPES, singleton(oakTypeName), NAMES);
+
sessionContext.getAccessManager().checkPermissions(dlg.getTree(), prop, 
Permissions.READ_PROPERTY);

Review Comment:
   Done.
   
   @anchela, please have a look at the changes again. 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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] stefan-egli closed pull request #1087: OAK-10199 : update _modified when detail gc actually removes garbage

2023-08-28 Thread via GitHub


stefan-egli closed pull request #1087: OAK-10199 : update _modified when detail 
gc actually removes garbage
URL: https://github.com/apache/jackrabbit-oak/pull/1087


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1086: OAK-10420 Tool to compare Lucene index content

2023-08-28 Thread via GitHub


sonarcloud[bot] commented on PR #1086:
URL: https://github.com/apache/jackrabbit-oak/pull/1086#issuecomment-1695930867

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=SECURITY_HOTSPOT)
 
[![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png
 
'E')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=SECURITY_HOTSPOT)
 [1 Security 
Hotspot](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=CODE_SMELL)
 [11 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=false=CODE_SMELL)
   
   
[![7.1%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'7.1%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=new_coverage=list)
 [7.1% 
Coverage](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1086=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20) you have used to run this analysis is 
deprecated and we will stop accepting it soon. Please update to at least Java 
17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] stefan-egli opened a new pull request, #1087: OAK-10199 : update _modified when detail gc actually removes garbage

2023-08-28 Thread via GitHub


stefan-egli opened a new pull request, #1087:
URL: https://github.com/apache/jackrabbit-oak/pull/1087

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] adamcin opened a new pull request, #1094: OAK-10424 add support for FASTSIZE query option and related JCR privilege

2023-08-31 Thread via GitHub


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

   - add SQL2 query option FASTSIZE
   - if oak.fastQuerySize is not enabled globally, require privilege 
`rep:queryOptionFastSize` on repository root path


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] rishabhdaim merged pull request #1079: OAK-10378 : added metrics to collect detailedGC cycle & deleted properties data

2023-09-01 Thread via GitHub


rishabhdaim merged PR #1079:
URL: https://github.com/apache/jackrabbit-oak/pull/1079


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] github-actions[bot] commented on pull request #293: OAK-9436 clean transient session storage after exceptions during import

2023-08-31 Thread via GitHub


github-actions[bot] commented on PR #293:
URL: https://github.com/apache/jackrabbit-oak/pull/293#issuecomment-1701996876

   This PR is stale because it has been open 24 months with no activity. Remove 
stale label or comment or this will be closed in 30 days.


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1080: OAK-10410 : fixed potential NPE from AbstractMongoConnectionTest

2023-09-01 Thread via GitHub


sonarcloud[bot] commented on PR #1080:
URL: https://github.com/apache/jackrabbit-oak/pull/1080#issuecomment-1702475374

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=coverage=list)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1080=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20) you have used to run this analysis is 
deprecated and we will stop accepting it soon. Please update to at least Java 
17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] stefan-egli opened a new pull request, #1090: OAK-8646 : Clean up changes from orphaned branch commits

2023-08-30 Thread via GitHub


stefan-egli opened a new pull request, #1090:
URL: https://github.com/apache/jackrabbit-oak/pull/1090

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1111: OAK-8646 : added metrics for unmergedbranch commits & improved junit coverage

2023-09-12 Thread via GitHub


sonarcloud[bot] commented on PR #:
URL: https://github.com/apache/jackrabbit-oak/pull/#issuecomment-1716190593

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=BUG)
 
[![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png
 
'B')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=BUG)
 [1 
Bug](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak==false=CODE_SMELL)
   
   
[![86.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'86.5%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak==new_coverage=list)
 [86.5% 
Coverage](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak==new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak==new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak==new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20.1) you have used to run this analysis 
is deprecated and we will stop accepting it soon. Please update to at least 
Java 17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1115: OAK-10443: refactor AbstractDataStoreService so that it doesn't need the statisticsProvider OSGi reference

2023-09-12 Thread via GitHub


sonarcloud[bot] commented on PR #1115:
URL: https://github.com/apache/jackrabbit-oak/pull/1115#issuecomment-1715794308

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=false=CODE_SMELL)
   
   
[![35.7%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png
 
'35.7%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=new_coverage=list)
 [35.7% 
Coverage](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1115=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20.1) you have used to run this analysis 
is deprecated and we will stop accepting it soon. Please update to at least 
Java 17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] fabriziofortino opened a new pull request, #1116: OAK-10441: exclude snakeyaml from oak-search-elastic

2023-09-12 Thread via GitHub


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

   Exclude package `org.yaml.snakeyaml.*` from OSGI config.


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke merged pull request #1115: OAK-10443: refactor AbstractDataStoreService so that it doesn't need the statisticsProvider OSGi reference

2023-09-12 Thread via GitHub


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


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1112: OAK-6759: Convert oak-blob-cloud-azure to OSGi R6 annotations

2023-09-12 Thread via GitHub


sonarcloud[bot] commented on PR #1112:
URL: https://github.com/apache/jackrabbit-oak/pull/1112#issuecomment-1716128080

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20.1) you have used to run this analysis 
is deprecated and we will stop accepting it soon. Please update to at least 
Java 17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] sonarcloud[bot] commented on pull request #1112: OAK-6759: Convert oak-blob-cloud-azure to OSGi R6 annotations

2023-09-12 Thread via GitHub


sonarcloud[bot] commented on PR #1112:
URL: https://github.com/apache/jackrabbit-oak/pull/1112#issuecomment-1715304941

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=coverage=list)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak=1112=new_duplicated_lines_density=list)
   
   
![warning](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning-16px.png
 'warning') The version of Java (11.0.20.1) you have used to run this analysis 
is deprecated and we will stop accepting it soon. Please update to at least 
Java 17.
   Read more [here](https://docs.sonarcloud.io/appendices/scanner-environment/)
   
   
   


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke opened a new pull request, #1115: OAK-10443: refactor AbstractDataStoreService so that it doesn't need the statisticsProvider OSGi reference

2023-09-12 Thread via GitHub


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

   (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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] fabriziofortino merged pull request #1116: OAK-10441: exclude snakeyaml from oak-search-elastic

2023-09-13 Thread via GitHub


fabriziofortino merged PR #1116:
URL: https://github.com/apache/jackrabbit-oak/pull/1116


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



[GitHub] [jackrabbit-oak] reschke merged pull request #1112: OAK-6759: Convert oak-blob-cloud-azure to OSGi R6 annotations

2023-09-13 Thread via GitHub


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


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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



  1   2   3   4   5   6   7   8   9   10   >