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

MongoDB cache store uses illegal collection names

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.3, 2.7, 2.8
    • Fix Version/s: 2.6.4, 2.7.1
    • Component/s: Caching
    • Labels:
    • Testing Instructions:
      Hide

      Note: If you were using Mongo before this for Moodle you need to drop the mcache database for this test.

      1. Set MongoDB as a cache store in Moodle and browse around Moodle a bit to get some data in it.
      2. In the terminal run the following:
        • mongo
        • use mcache
        • show collections
      3. Look through the list of collections and ensure every single one of them starts with 'm'
      Show
      Note: If you were using Mongo before this for Moodle you need to drop the mcache database for this test. Set MongoDB as a cache store in Moodle and browse around Moodle a bit to get some data in it. In the terminal run the following: mongo use mcache show collections Look through the list of collections and ensure every single one of them starts with 'm'
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:
      46208-28
    • Pull Master Diff URL:

      Description

      Moodle creates MongoDB collections names that start with digits. This is a bug.

      According to http://docs.mongodb.org/manual/reference/limits/:
      "Collection names should begin with an underscore or a letter character, ..."

      The bug is evident when one tries to use the mongo find command on a collection whose name begins with a digit (e.g., 1b088c226629b3fa247ff7ef67dad266). The result is "Unexpected token ILLEGAL."

      > db.1b088c226629b3fa247ff7ef67dad266.find()
      Mon Jun 30 10:14:37.745 SyntaxError: Unexpected token ILLEGAL

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Jul/14