db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r1069598 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/services/daemon/ engine/org/apache/derby/impl/sql/catalog/ testing/org/apache/derbyTesting/functionTests/tests/store/
Date Thu, 10 Feb 2011 22:44:08 GMT
Author: kristwaa
Date: Thu Feb 10 22:44:08 2011
New Revision: 1069598

URL: http://svn.apache.org/viewvc?rev=1069598&view=rev
Log:
DERBY-4939: Enable istat daemon and tests

Enabled the automatic creation and scheduling of index cardinality statistics
when compiling prepared statements.

NOTE: To disable the feature, use 'derby.storage.indexStats.auto=false'.

Patch file: derby-4939-1a-enable_istat.diff

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java?rev=1069598&r1=1069597&r2=1069598&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java
Thu Feb 10 22:44:08 2011
@@ -215,14 +215,12 @@ public class IndexStatisticsDaemonImpl
         this.timeOfCreation = System.currentTimeMillis();
         trace(0, "created{log=" + doLog + ", traceLog=" +
                 traceToDerbyLog + ", traceOut=" + traceToStdOut +
-                /* Will be fixed by DERBY-4936.
                 ", createThreshold=" +
                 TableDescriptor.ISTATS_CREATE_THRESHOLD +
                 ", absdiffThreshold=" +
                 TableDescriptor.ISTATS_ABSDIFF_THRESHOLD +
                 ", lndiffThreshold=" +
                 TableDescriptor.ISTATS_LNDIFF_THRESHOLD +
-                */
                 ", queueLength=" + MAX_QUEUE_LENGTH +
                 "}) -> " + databaseName);
     }
@@ -236,8 +234,7 @@ public class IndexStatisticsDaemonImpl
      * @param td base table descriptor to update index statistics for
      */
     public void schedule(TableDescriptor td) {
-        // TODO: Will be fixed in DERBY-4936.
-        String schedulingReason = null; // td.getIndexStatsUpdateReason();
+        String schedulingReason = td.getIndexStatsUpdateReason();
         trace(0, "scheduling " + td.getQualifiedName() +
                     (schedulingReason == null
                         ? ""

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?rev=1069598&r1=1069597&r2=1069598&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Thu Feb 10 22:44:08 2011
@@ -644,11 +644,7 @@ public final class	DataDictionaryImpl
         // property later on.
         // The default is that automatic index statistics update is enabled.
         indexStatsUpdateDisabled = !PropertyUtil.getSystemBoolean(
-                // TODO: Disabled by default for now, fix in DERBY-4939.
-                //       Note that the daemon does nothing automatically
-                //       without DERBY-4938.
-                Property.STORAGE_AUTO_INDEX_STATS, false);
-                //Property.STORAGE_AUTO_INDEX_STATS, true);
+                Property.STORAGE_AUTO_INDEX_STATS, true);
 
         // See if we should enable logging of index stats activities.
         indexStatsUpdateLogging = PropertyUtil.getSystemBoolean(

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java?rev=1069598&r1=1069597&r2=1069598&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
Thu Feb 10 22:44:08 2011
@@ -69,6 +69,8 @@ public class _Suite extends BaseTestCase
         suite.addTest(IndexSplitDeadlockTest.suite());
         suite.addTest(HoldCursorJDBC30Test.suite());
         suite.addTest(AccessTest.suite());
+        suite.addTest(AutomaticIndexStatisticsTest.suite());
+        suite.addTest(AutomaticIndexStatisticsMultiTest.suite());
         
         /* Tests that only run in sane builds */
         if (SanityManager.DEBUG) {



Mime
View raw message