Moodle
  1. Moodle
  2. MDL-39390

Delete the old "static" cache from moodle database

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Testing Instructions:
      Hide

      Note to tester: In order to test this is ideal to have MDL-39343 already integrated, because that one fixes some problems (all databases) detected on upgrade / re-installing.

      TEST0: Verify that the "databasemeta" is being used in the caches footer information, leading to hits on page reloads at front page & course page.
      TEST1: Install 2.5 for all databases.
      TEST2: Upgrade from both 2.2 and 2.4 all databases.
      TEST3: Run lib/dml, lib/ddl and cache unit tests for all databases (note that cache ones can show some tests skipped).

      Show
      Note to tester: In order to test this is ideal to have MDL-39343 already integrated, because that one fixes some problems (all databases) detected on upgrade / re-installing. TEST0: Verify that the "databasemeta" is being used in the caches footer information, leading to hits on page reloads at front page & course page. TEST1: Install 2.5 for all databases. TEST2: Upgrade from both 2.2 and 2.4 all databases. TEST3: Run lib/dml, lib/ddl and cache unit tests for all databases (note that cache ones can show some tests skipped).
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      50028

      Description

      Once all databases have the "databasemeta" cache implemented (MDL-39389), it's no longer necessary to have the moodle_database->columns property.

      This change will, simply, get rid of it.

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sending to peer-review.

          Show
          Eloy Lafuente (stronk7) added a comment - Sending to peer-review.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Note to testers, integrators. If this is integrated together (after) MDL-39389, then both issues can be tested together.

          Show
          Eloy Lafuente (stronk7) added a comment - Note to testers, integrators. If this is integrated together (after) MDL-39389 , then both issues can be tested together.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sending to integration coz MDL-39389 has been sent and this is trivially built on top of it.

          Show
          Eloy Lafuente (stronk7) added a comment - Sending to integration coz MDL-39389 has been sent and this is trivially built on top of it.
          Hide
          Dan Poltawski added a comment -

          Integrated to master - thanks Eloy

          Show
          Dan Poltawski added a comment - Integrated to master - thanks Eloy
          Hide
          Andrew Davis added a comment -

          TEST0: Verify that the "databasemeta" is being used in the caches footer information, leading to hits on page reloads at front page & course page.

          DONE

          TEST1: Install 2.5 for all databases.

          While installing in mysql I'm getting the following

          Notice: Undefined property: stdClass::$maxbytes in /home/andrew/Desktop/code/moodle/int/master/admin/settings/security.php on line 26
          Call Stack

          1. Time Memory Function Location
            1 0.0017 364640
            Unknown macro: {main}

            ( ) ../index.php:0
            2 8.5659 27567328 install_core( ) ../index.php:202
            3 162.2845 28336816 admin_apply_default_settings( ) ../upgradelib.php:1494
            4 162.2845 28337088 admin_get_root( ) ../adminlib.php:6399
            5 167.5065 30043560 require( '/home/andrew/Desktop/code/moodle/int/master/admin/settings/security.php' ) ../adminlib.php:6377

          When saving the admin's details I got the following warnings from user/editadvanced.php

          ( ! ) Notice: Undefined property: stdClass::$maxbytes in /home/andrew/Desktop/code/moodle/int/master/mod/assign/submission/file/settings.php on line 41
          Call Stack

          1. Time Memory Function Location
            1 0.0015 323352
            Unknown macro: {main}

            ( ) ../editadvanced.php:0
            2 0.9236 27094472 admin_apply_default_settings( ) ../editadvanced.php:251
            3 0.9236 27094744 admin_get_root( ) ../adminlib.php:6399
            4 1.4368 31653528 require( '/home/andrew/Desktop/code/moodle/int/master/admin/settings/plugins.php' ) ../adminlib.php:6379
            5 2.5478 36394768 plugininfo_mod->load_settings( ) ../plugins.php:17
            6 2.5485 36424816 include( '/home/andrew/Desktop/code/moodle/int/master/mod/assign/settings.php' ) ../pluginlib.php:3366
            7 2.5547 36432536 assign_plugin_manager::add_admin_assign_plugin_settings( ) ../settings.php:39
            8 2.5559 36443728 include( '/home/andrew/Desktop/code/moodle/int/master/mod/assign/submission/file/settings.php' ) ../adminlib.php:481

            ( ! ) Notice: Undefined property: stdClass::$assignment_maxbytes in /home/andrew/Desktop/code/moodle/int/master/mod/assignment/settings.php on line 10
            Call Stack

            1. Time Memory Function Location
              1 0.0015 323352

            ( ) ../editadvanced.php:0
            2 0.9236 27094472 admin_apply_default_settings( ) ../editadvanced.php:251
            3 0.9236 27094744 admin_get_root( ) ../adminlib.php:6399
            4 1.4368 31653528 require( '/home/andrew/Desktop/code/moodle/int/master/admin/settings/plugins.php' ) ../adminlib.php:6379
            5 2.5819 36435960 plugininfo_mod->load_settings( ) ../plugins.php:17
            6 2.5824 36449520 include( '/home/andrew/Desktop/code/moodle/int/master/mod/assignment/settings.php' ) ../pluginlib.php:3366

          ( ! ) Notice: Undefined property: stdClass::$forum_maxbytes in /home/andrew/Desktop/code/moodle/int/master/mod/forum/settings.php on line 49
          Call Stack

          1. Time Memory Function Location
            1 0.0015 323352
            Unknown macro: {main}

            ( ) ../editadvanced.php:0
            2 0.9236 27094472 admin_apply_default_settings( ) ../editadvanced.php:251
            3 0.9236 27094744 admin_get_root( ) ../adminlib.php:6399
            4 1.4368 31653528 require( '/home/andrew/Desktop/code/moodle/int/master/admin/settings/plugins.php' ) ../adminlib.php:6379
            5 2.6273 38331984 plugininfo_mod->load_settings( ) ../plugins.php:17
            6 2.6280 38370032 include( '/home/andrew/Desktop/code/moodle/int/master/mod/forum/settings.php' ) ../pluginlib.php:3366

            ( ! ) Notice: Undefined property: stdClass::$maxbytes in /home/andrew/Desktop/code/moodle/int/master/mod/workshop/settings.php on line 51
            Call Stack

            1. Time Memory Function Location
              1 0.0015 323352

            ( ) ../editadvanced.php:0
            2 0.9236 27094472 admin_apply_default_settings( ) ../editadvanced.php:251
            3 0.9236 27094744 admin_get_root( ) ../adminlib.php:6399
            4 1.4368 31653528 require( '/home/andrew/Desktop/code/moodle/int/master/admin/settings/plugins.php' ) ../adminlib.php:6379
            5 3.2164 44258232 plugininfo_mod->load_settings( ) ../plugins.php:17
            6 3.2170 44290360 include( '/home/andrew/Desktop/code/moodle/int/master/mod/workshop/settings.php' ) ../pluginlib.php:3366

          I'm then sent to http://localhost/moodle/int/master/admin/index.php?sessionstarted=1&lang=en and told

          The page isn't redirecting properly
          Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

          No matter what URL I access I get the same error.

          Show
          Andrew Davis added a comment - TEST0: Verify that the "databasemeta" is being used in the caches footer information, leading to hits on page reloads at front page & course page. DONE TEST1: Install 2.5 for all databases. While installing in mysql I'm getting the following Notice: Undefined property: stdClass::$maxbytes in /home/andrew/Desktop/code/moodle/int/master/admin/settings/security.php on line 26 Call Stack Time Memory Function Location 1 0.0017 364640 Unknown macro: {main} ( ) ../index.php:0 2 8.5659 27567328 install_core( ) ../index.php:202 3 162.2845 28336816 admin_apply_default_settings( ) ../upgradelib.php:1494 4 162.2845 28337088 admin_get_root( ) ../adminlib.php:6399 5 167.5065 30043560 require( '/home/andrew/Desktop/code/moodle/int/master/admin/settings/security.php' ) ../adminlib.php:6377 When saving the admin's details I got the following warnings from user/editadvanced.php ( ! ) Notice: Undefined property: stdClass::$maxbytes in /home/andrew/Desktop/code/moodle/int/master/mod/assign/submission/file/settings.php on line 41 Call Stack Time Memory Function Location 1 0.0015 323352 Unknown macro: {main} ( ) ../editadvanced.php:0 2 0.9236 27094472 admin_apply_default_settings( ) ../editadvanced.php:251 3 0.9236 27094744 admin_get_root( ) ../adminlib.php:6399 4 1.4368 31653528 require( '/home/andrew/Desktop/code/moodle/int/master/admin/settings/plugins.php' ) ../adminlib.php:6379 5 2.5478 36394768 plugininfo_mod->load_settings( ) ../plugins.php:17 6 2.5485 36424816 include( '/home/andrew/Desktop/code/moodle/int/master/mod/assign/settings.php' ) ../pluginlib.php:3366 7 2.5547 36432536 assign_plugin_manager::add_admin_assign_plugin_settings( ) ../settings.php:39 8 2.5559 36443728 include( '/home/andrew/Desktop/code/moodle/int/master/mod/assign/submission/file/settings.php' ) ../adminlib.php:481 ( ! ) Notice: Undefined property: stdClass::$assignment_maxbytes in /home/andrew/Desktop/code/moodle/int/master/mod/assignment/settings.php on line 10 Call Stack Time Memory Function Location 1 0.0015 323352 ( ) ../editadvanced.php:0 2 0.9236 27094472 admin_apply_default_settings( ) ../editadvanced.php:251 3 0.9236 27094744 admin_get_root( ) ../adminlib.php:6399 4 1.4368 31653528 require( '/home/andrew/Desktop/code/moodle/int/master/admin/settings/plugins.php' ) ../adminlib.php:6379 5 2.5819 36435960 plugininfo_mod->load_settings( ) ../plugins.php:17 6 2.5824 36449520 include( '/home/andrew/Desktop/code/moodle/int/master/mod/assignment/settings.php' ) ../pluginlib.php:3366 ( ! ) Notice: Undefined property: stdClass::$forum_maxbytes in /home/andrew/Desktop/code/moodle/int/master/mod/forum/settings.php on line 49 Call Stack Time Memory Function Location 1 0.0015 323352 Unknown macro: {main} ( ) ../editadvanced.php:0 2 0.9236 27094472 admin_apply_default_settings( ) ../editadvanced.php:251 3 0.9236 27094744 admin_get_root( ) ../adminlib.php:6399 4 1.4368 31653528 require( '/home/andrew/Desktop/code/moodle/int/master/admin/settings/plugins.php' ) ../adminlib.php:6379 5 2.6273 38331984 plugininfo_mod->load_settings( ) ../plugins.php:17 6 2.6280 38370032 include( '/home/andrew/Desktop/code/moodle/int/master/mod/forum/settings.php' ) ../pluginlib.php:3366 ( ! ) Notice: Undefined property: stdClass::$maxbytes in /home/andrew/Desktop/code/moodle/int/master/mod/workshop/settings.php on line 51 Call Stack Time Memory Function Location 1 0.0015 323352 ( ) ../editadvanced.php:0 2 0.9236 27094472 admin_apply_default_settings( ) ../editadvanced.php:251 3 0.9236 27094744 admin_get_root( ) ../adminlib.php:6399 4 1.4368 31653528 require( '/home/andrew/Desktop/code/moodle/int/master/admin/settings/plugins.php' ) ../adminlib.php:6379 5 3.2164 44258232 plugininfo_mod->load_settings( ) ../plugins.php:17 6 3.2170 44290360 include( '/home/andrew/Desktop/code/moodle/int/master/mod/workshop/settings.php' ) ../pluginlib.php:3366 I'm then sent to http://localhost/moodle/int/master/admin/index.php?sessionstarted=1&lang=en and told The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. No matter what URL I access I get the same error.
          Hide
          Andrew Davis added a comment -

          I have $CFG->debug = (E_ALL | E_STRICT); in my config.php which may be why Im seeing all these warnings.

          Show
          Andrew Davis added a comment - I have $CFG->debug = (E_ALL | E_STRICT); in my config.php which may be why Im seeing all these warnings.
          Hide
          Damyon Wiese added a comment -

          Sounds like MDL-39077 - we are retesting fresh installs for that issue now.

          Show
          Damyon Wiese added a comment - Sounds like MDL-39077 - we are retesting fresh installs for that issue now.
          Hide
          Damyon Wiese added a comment -

          Thanks Andrew,

          The fix for MDL-39077 has been integrated so this can be tested again.

          Show
          Damyon Wiese added a comment - Thanks Andrew, The fix for MDL-39077 has been integrated so this can be tested again.
          Hide
          Andrew Davis added a comment -

          I've now been able to install using mysql. Looking at integration.moodle.org it looks like the unit tests are passing fine.

          I'm about to install using postgres. I'll try and get an upgrade, maybe two, done but I suspect thats about as far as I'll be able to go testing this.

          Show
          Andrew Davis added a comment - I've now been able to install using mysql. Looking at integration.moodle.org it looks like the unit tests are passing fine. I'm about to install using postgres. I'll try and get an upgrade, maybe two, done but I suspect thats about as far as I'll be able to go testing this.
          Hide
          Andrew Davis added a comment -

          Installed in postgres without incident.

          Show
          Andrew Davis added a comment - Installed in postgres without incident.
          Hide
          Andrew Davis added a comment -

          I've upgraded from 2.3 to 2.5 using mysql.

          Show
          Andrew Davis added a comment - I've upgraded from 2.3 to 2.5 using mysql.
          Hide
          Andrew Davis added a comment -

          I'm about to log off for the evening. I'll do a 2.3->2.5 in postgres in the morning but my feeling is that this can probably be passed.

          Show
          Andrew Davis added a comment - I'm about to log off for the evening. I'll do a 2.3->2.5 in postgres in the morning but my feeling is that this can probably be passed.
          Hide
          Dan Poltawski added a comment -

          Thanks Andrew, yep I think it is sufficient (especially as i've done the same testing)

          Show
          Dan Poltawski added a comment - Thanks Andrew, yep I think it is sufficient (especially as i've done the same testing)
          Hide
          Dan Poltawski added a comment -

          I mean, i've run that 2.3 -> 2.5 upgrade

          Show
          Dan Poltawski added a comment - I mean, i've run that 2.3 -> 2.5 upgrade
          Hide
          Dan Poltawski added a comment -

          Thanks! You're changes are now spread to the world through this git and our source control repositories.

          No time to rest though, we've got days to make 2.5 the best yet!

          ciao

          Show
          Dan Poltawski added a comment - Thanks! You're changes are now spread to the world through this git and our source control repositories. No time to rest though, we've got days to make 2.5 the best yet! ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: