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

All caching plugins need to cope with caching servers being down

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Caching
    • Labels:
    • Testing Instructions:
      Hide

      Test 1

      1. Set debugging level to DEVELOPER, eventually w/ debugdisplay
      2. First, try the steps described in the description
      3. Add a memcache* store using a correct configuration
      4. Stop the memcached service serving that store
      5. Browse Site administration ► Plugins ► Caching ► Configuration again: no error about incorrect flushing the memcache* instance should be reported
      6. Try to update Moodle: no error about incorrect flushing against "stopped"/malconfigured stores should be reported too

      Test 2.

      1. Set up the test instance details for memcache, memcached, and mongodb.
      2. Browse to Settings > Plugins > Caching > Test performance.
      3. Make sure you get no errors.
      Show
      Test 1 Set debugging level to DEVELOPER , eventually w/ debugdisplay First, try the steps described in the description Add a memcache* store using a correct configuration Stop the memcached service serving that store Browse Site administration ► Plugins ► Caching ► Configuration again: no error about incorrect flushing the memcache* instance should be reported Try to update Moodle: no error about incorrect flushing against "stopped"/malconfigured stores should be reported too Test 2. Set up the test instance details for memcache, memcached, and mongodb. Browse to Settings > Plugins > Caching > Test performance. Make sure you get no errors.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      wip-MDL-36322-m25

      Description

      1. Add a mongodb cache instance (give it bad config)
      2. Change databasemeta to use it

      Expected result:
      Doesn't kill site

      Actual result:
      Exception - couldn't connect to any servers in the list
      Debug info:
      Error code: generalexceptionmessage
      Stack trace:
      line 256 of /cache/stores/mongodb/lib.php: MongoCursorException thrown
      line 256 of /cache/stores/mongodb/lib.php: call to MongoCollection->findOne()
      line 292 of /cache/classes/loaders.php: call to cachestore_mongodb->get()
      line 1272 of /cache/classes/loaders.php: call to cache->get()
      line 401 of /lib/dml/pgsql_native_moodle_database.php: call to cache_application->get()
      line 533 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_columns()
      line 1330 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()
      line 5879 of /lib/accesslib.php: call to moodle_database->get_record()
      line 7139 of /lib/accesslib.php: call to context_system::instance()
      line 699 of /lib/setup.php: call to get_system_context()
      line 100 of /config.php: call to require_once()
      line 28 of /cache/admin.php: call to require_once()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12