Joscorbe commented on code in PR #3114:
URL: https://github.com/apache/jackrabbit-oak/pull/3114#discussion_r3971233425


##########
oak-run/src/main/js/oak-mongo.js:
##########
@@ -145,7 +145,8 @@ var oak = (function(global){
         }
         var depth = pathDepth(path);
         var totalCount = 0;
-        var count = db.nodes.count({_id: pathFilter(depth + 1, path)});
+        var childDepth = path == "/" ? depth + 1 : depth;

Review Comment:
   Are you sure this is correct? For root deptch should be 0, so we increase 
+1, ok.
   
   But for the rest if I'm in /conf the depth is 1, and this will result in 
counting the nodes on the same level, not its children. This should count the 
number of nodes in depth 2, not 1, otherwise we would be counting siblings of 
the same path we are already in.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to