/[Apache-SVN]
ViewVC logotype

Revision 1497868


Jump to revision: Previous Next
Author: mamta
Date: Fri Jun 28 18:23:24 2013 UTC (10 years, 8 months ago)
Changed paths: 8
Log Message:
DERBY-5680( indexStat daemon processing tables over and over even when there are no changes in the tables )

Backporting the 3 commits that went in for DERBY-5680 to 10.8. The 3 commits were 1340549, 1341622, 1341629. The first two commits were easy to backport using svn merge command but the third commit 1341629 ran into conflicts. For that backport, hand made the changes since there were not too many changes.

The changes for this jira has added a new property derby.storage.indexStats.debug.keepDisposableStats. The intention of the property is that if the property is set to true, we do not delete the orphaned/disposable stats. If the property is set to false, the orphaned/disposable stats will get dropped by the index stats daemon. Currently known reasons for orphaned/disposable stats are
1)DERBY-5681(When a foreign key constraint on a table is dropped, the associated statistics row for the conglomerate is not removed). Fix for this has been backported all the way to 10.3
2)DERBY-3790(Investigate if request for update statistics can be skipped for certain kind of indexes, one instance may be unique indexes based on one column.) Fix for this is in 10.9 and higher

A junit test was added for this new property but it went in as part of DERBY-3790. The name of the junit test is store.KeepDisposableStatsPropertyTest. Had to make changes to this test to backport it to 10.8 but without the fix for DEBRY-3790 and with the absence of drop statistics procedure, the test really does not make much sense for 10.8 codeline. The test uses drop statistics procedure and it is mainly testing DERBY-3790 to make sure that the orphaned stats are being deleted or left behind based on whether the property is set to true or false. But since we do not have drop statistics procedure and we do not have DERBY-3790 fixed in 10.8, we can't really meaningfully run the KeepDisposableStatsPropertyTest in 10.8. In any case, I have changed the test so that atleast it will not fail in 10.8 but it is not able to truly test the property. May be we can test this property through upgrade suite where we will create orphaned stats because of DERBY-5681 on older releases and we will find that when the property is set to true, even after upgrade, we will have orphaned stats but when property is set to false, after upgrade, orphaned stats are deleted.
 


Changed paths

Path Details
Directorydb/derby/code/branches/10.8/ modified , props changed
Directorydb/derby/code/branches/10.8/java/engine/org/apache/derby/iapi/reference/Property.java modified , text changed
Directorydb/derby/code/branches/10.8/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java modified , text changed
Directorydb/derby/code/branches/10.8/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java modified , text changed
Directorydb/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java modified , text changed
Directorydb/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UpdateStatisticsTest.java modified , text changed
Directorydb/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/KeepDisposableStatsPropertyTest.java added
Directorydb/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26