Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-71438

Block deletion timeouts can occur on large sites

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MOODLE_311_MDL-71438_v2
    • master-MDL-71438_v2
    • Hide

      1. Init phpunit and run the following testcase, confirming that it is passing:

      vendor/bin/phpunit --filter core_blocklib_testcase
      

      2. In a installed site, using you DB manager or CLI confirm, that the index is created. Eg for mysql:

      mysql> show create table mdl_user_preferences\G
      *************************** 1. row ***************************
             Table: mdl_user_preferences
      Create Table: CREATE TABLE `mdl_user_preferences` (
        `id` bigint(10) NOT NULL AUTO_INCREMENT,
        `userid` bigint(10) NOT NULL DEFAULT '0',
        `name` varchar(255) NOT NULL DEFAULT '',
        `value` varchar(1333) NOT NULL DEFAULT '',
        PRIMARY KEY (`id`),
        UNIQUE KEY `mdl_userpref_usenam_uix` (`userid`,`name`),
        KEY `mdl_userpref_nam_ix` (`name`)
      ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED COMMENT='Allows modules to store arbitrary user preferences'
      1 row in set (0.00 sec)
      
      

      3. If your DB was upgraded and the index was created via upgrade script then run the following command to confirm, that current DB state matches the install.xml files:

      root@f5f1a3f62cb1:/siteroot# php admin/cli/check_database_schema.php
      Database structure is ok.
      

      Show
      1. Init phpunit and run the following testcase, confirming that it is passing: vendor/bin/phpunit --filter core_blocklib_testcase 2. In a installed site, using you DB manager or CLI confirm , that the index is created. Eg for mysql: mysql> show create table mdl_user_preferences\G *************************** 1 . row *************************** Table: mdl_user_preferences Create Table: CREATE TABLE `mdl_user_preferences` ( `id` bigint( 10 ) NOT NULL AUTO_INCREMENT, `userid` bigint( 10 ) NOT NULL DEFAULT '0' , `name` varchar( 255 ) NOT NULL DEFAULT '' , `value` varchar( 1333 ) NOT NULL DEFAULT '' , PRIMARY KEY (`id`), UNIQUE KEY `mdl_userpref_usenam_uix` (`userid`,`name`), KEY `mdl_userpref_nam_ix` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT= 4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED COMMENT= 'Allows modules to store arbitrary user preferences' 1 row in set ( 0.00 sec) 3. If your DB was upgraded and the index was created via upgrade script then run the following command to confirm , that current DB state matches the install.xml files: root @f5f1a3f62cb1 :/siteroot# php admin/cli/check_database_schema.php Database structure is ok.

    Description

      When removing blocks in bulk on a large site with a big number of users an error can occur:

      Attachments

        Activity

          People

            mikhailgolenkov Misha Golenkov
            mikhailgolenkov Misha Golenkov
            Matt Porritt Matt Porritt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/Jul/21

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 50 minutes
                2h 50m