Derby
  1. Derby
  2. DERBY-6064

Failures in upgradeTests.Changes10_9 related to index cardinality statistics

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: 10.9.2.2, 10.10.1.1
    • Component/s: Test
    • Labels:
      None

      Description

      The upgrade test fails when run with 10.8.3. The reason is that a fix has been backported to 10.8.3, and older branches back to 10.3, and this fix invalidates assumptions made in some of the tests in Changes10_9.

      Example of failures:
      https://builds.apache.org/job/Derby-10.9-suites.All/60/testReport/

      As a side note, I'm wondering if we don't have good enough routines to make sure we run the upgrade tests with maintenance releases on older branches before releasing them. I don't know if we can avoid this situation in general, that would at least require very careful consideration on how to write the upgrade test.

      1. derby-6064-2a-fix_comment.diff
        2 kB
        Kristian Waagan
      2. derby-6064-1a-istat_upgrade_test_fixes.diff
        12 kB
        Kristian Waagan

        Activity

        Hide
        Kristian Waagan added a comment -

        Merged the fix into the 10.9 branch with revision 1442552.

        Resolving issue.

        Show
        Kristian Waagan added a comment - Merged the fix into the 10.9 branch with revision 1442552. Resolving issue.
        Hide
        Kristian Waagan added a comment -

        Committed patch 2a, which improves the inaccurate comment pointed out by Dag, to trunk with revision 1442483.

        Show
        Kristian Waagan added a comment - Committed patch 2a, which improves the inaccurate comment pointed out by Dag, to trunk with revision 1442483.
        Hide
        Kristian Waagan added a comment -

        Thanks, Dag.
        I'll update the comment to make it more accurate.
        Committed patch 1a to trunk with revision 1441923.

        I'll also look at merging the fix into the 10.9-branch.

        Show
        Kristian Waagan added a comment - Thanks, Dag. I'll update the comment to make it more accurate. Committed patch 1a to trunk with revision 1441923. I'll also look at merging the fix into the 10.9-branch.
        Hide
        Dag H. Wanvik added a comment -

        Patch looks good. One comment threw me off a bit:

        // We expect that the maximum number of statistics have been
        // created here, since we're using an older version of Derby
        // that contained a bug and lacked the latest optimizations.

        with "older version" being 10.8.3 the bug is gone, right? If so the comment isn't entirely accurate and it woould be good to fix that.

        Show
        Dag H. Wanvik added a comment - Patch looks good. One comment threw me off a bit: // We expect that the maximum number of statistics have been // created here, since we're using an older version of Derby // that contained a bug and lacked the latest optimizations. with "older version" being 10.8.3 the bug is gone, right? If so the comment isn't entirely accurate and it woould be good to fix that.
        Hide
        Kristian Waagan added a comment -

        Attaching patch 1a, which is a suggestion on how to fix the problem.

        The test helper class DisposableIndexStatistics now adjusts the expected counts for statistics entries based on the version of the old database. Versions with the fix for DERBY-5681 will have one less entry. The range check I introduced for the overall number of statistics entries is a bit fuzzy, but I think it's good enough - especially since the tests would fail in other places if we made old versions stop generating statistics for single column unique indexes.

        Patch ready for review.

        Show
        Kristian Waagan added a comment - Attaching patch 1a, which is a suggestion on how to fix the problem. The test helper class DisposableIndexStatistics now adjusts the expected counts for statistics entries based on the version of the old database. Versions with the fix for DERBY-5681 will have one less entry. The range check I introduced for the overall number of statistics entries is a bit fuzzy, but I think it's good enough - especially since the tests would fail in other places if we made old versions stop generating statistics for single column unique indexes. Patch ready for review.

          People

          • Assignee:
            Kristian Waagan
            Reporter:
            Kristian Waagan
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development