Author: reschke
Date: Tue Feb  2 13:22:07 2016
New Revision: 1728114

URL: http://svn.apache.org/viewvc?rev=1728114&view=rev
Log:
OAK-3971: RDBDocumentStore: include table name when logging slow/excessive 
queries

Modified:
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStoreJDBC.java

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStoreJDBC.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStoreJDBC.java?rev=1728114&r1=1728113&r2=1728114&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStoreJDBC.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStoreJDBC.java
 Tue Feb  2 13:22:07 2016
@@ -591,14 +591,15 @@ public class RDBDocumentStoreJDBC {
         long elapsed = System.currentTimeMillis() - start;
         if (this.queryHitsLimit != 0 && result.size() > this.queryHitsLimit) {
             String message = String.format(
-                    "Potentially excessive query with %d hits (limited to %d, 
configured QUERYHITSLIMIT %d), elapsed time %dms, params minid '%s' maxid '%s' 
excludeKeyPatterns %s condition %s limit %d. Check calling method.",
-                    result.size(), limit, this.queryHitsLimit, elapsed, minId, 
maxId, excludeKeyPatterns, conditions, limit);
+                    "Potentially excessive query on %s with %d hits (limited 
to %d, configured QUERYHITSLIMIT %d), elapsed time %dms, params minid '%s' 
maxid '%s' excludeKeyPatterns %s condition %s limit %d. Read %d chars from DATA 
and %d bytes from BDATA. Check calling method.",
+                    tmd.getName(), result.size(), limit, this.queryHitsLimit, 
elapsed, minId, maxId, excludeKeyPatterns, conditions,
+                    limit, dataTotal, bdataTotal);
             LOG.info(message, new Exception("call stack"));
         } else if (this.queryTimeLimit != 0 && elapsed > this.queryTimeLimit) {
             String message = String.format(
-                    "Long running query with %d hits (limited to %d), elapsed 
time %dms (configured QUERYTIMELIMIT %d), params minid '%s' maxid '%s' 
excludeKeyPatterns %s conditions %s limit %d. Read %d chars from DATA and %d 
bytes from BDATA. Check calling method.",
-                    result.size(), limit, elapsed, this.queryTimeLimit, minId, 
maxId, excludeKeyPatterns, conditions, limit,
-                    dataTotal, bdataTotal);
+                    "Long running query on %s with %d hits (limited to %d), 
elapsed time %dms (configured QUERYTIMELIMIT %d), params minid '%s' maxid '%s' 
excludeKeyPatterns %s conditions %s limit %d. Read %d chars from DATA and %d 
bytes from BDATA. Check calling method.",
+                    tmd.getName(), result.size(), limit, elapsed, 
this.queryTimeLimit, minId, maxId, excludeKeyPatterns, conditions,
+                    limit, dataTotal, bdataTotal);
             LOG.info(message, new Exception("call stack"));
         }
 


Reply via email to