You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "thomasmueller (via GitHub)" <gi...@apache.org> on 2023/08/03 08:28:05 UTC

[GitHub] [jackrabbit-oak] thomasmueller commented on a diff in pull request #1012: OAK-10333 Improved logging for queries that that traverse 20'000 nodes

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


##########
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/cursor/TraversingCursor.java:
##########
@@ -159,10 +159,15 @@ private void fetchNext() {
 
                 readCount++;
                 if (readCount % 1000 == 0) {
-                    FilterIterators.checkReadLimit(readCount, settings);
-                    String caller = IndexUtils.getCaller(this.settings.getIgnoredClassNamesInCallTrace());
-                    LOG.warn("Traversed {} nodes with filter {} called by {}; consider creating an index or changing the query" , 
-                            readCount, filter, caller);
+                    if (readCount == 20000) {
+                        LOG.warn("Traversed {} nodes with filter {}; consider creating an index or changing the query",
+                                readCount, filter, new Exception("call stack"));

Review Comment:
   Not it is not good enough.
   
   > The stack trace creates a lot more noise
   
   But it is needed. In the past, we have seem multiple cases where the caller was not sufficient. The stack trace is needed.



-- 
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-unsubscribe@jackrabbit.apache.org

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