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

Reply via email to