[teiid-commits] teiid SVN: r3921 - in branches/7.7.x/engine/src/main: resources/org/teiid/query and 1 other directory.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed Mar 7 20:02:31 EST 2012


Author: shawkins
Date: 2012-03-07 20:02:30 -0500 (Wed, 07 Mar 2012)
New Revision: 3921

Modified:
   branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
   branches/7.7.x/engine/src/main/resources/org/teiid/query/i18n.properties
Log:
TEIID-1964 adding a log about query timeout

Modified: branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java	2012-03-07 21:33:00 UTC (rev 3920)
+++ branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java	2012-03-08 01:02:30 UTC (rev 3921)
@@ -346,6 +346,7 @@
         long timeout = workContext.getVDB().getQueryTimeout();
         timeout = Math.min(timeout>0?timeout:Long.MAX_VALUE, config.getQueryTimeout()>0?config.getQueryTimeout():Long.MAX_VALUE);
         if (timeout < Long.MAX_VALUE) {
+        	final long finalTimeout = timeout;
         	workItem.setCancelTask(this.cancellationTimer.add(new Runnable() {
 				WeakReference<RequestWorkItem> workItemRef = new WeakReference<RequestWorkItem>(workItem);
 				@Override
@@ -353,6 +354,7 @@
 					try {
 						RequestWorkItem wi = workItemRef.get();
 						if (wi != null) {
+							LogManager.logInfo(LogConstants.CTX_DQP, QueryPlugin.Util.getString("query_timeout", wi.requestID, finalTimeout)); //$NON-NLS-1$
 							wi.requestCancel();
 						}
 					} catch (TeiidComponentException e) {

Modified: branches/7.7.x/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- branches/7.7.x/engine/src/main/resources/org/teiid/query/i18n.properties	2012-03-07 21:33:00 UTC (rev 3920)
+++ branches/7.7.x/engine/src/main/resources/org/teiid/query/i18n.properties	2012-03-08 01:02:30 UTC (rev 3921)
@@ -950,4 +950,6 @@
 DependentCriteriaProcessor.dep_join_backoff=Not performing dependent join using source {0}, since the number of distinct rows for expression {1} exceeds {2}.  You should ensure that your source statistics, including column distinct value counts, accurately reflect the source or use a MAKE_DEP hint to force the join.
 
 invalid_schema=Invalid schema from translator metadata expected {0}, but the returned MetadataStore contained no such schema or more than 1 schema.
-invalid_table=Invalid table {0}.  A table must have 1 or more columns. 
\ No newline at end of file
+invalid_table=Invalid table {0}.  A table must have 1 or more columns. 
+
+query_timeout=Cancelling query {0} since it has exceeded the timeout of {1} milliseconds.
\ No newline at end of file



More information about the teiid-commits mailing list