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

MongoDB cache store uses illegal collection names

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6.4, 2.7.1
    • 2.6.3, 2.7, 2.8
    • Caching
    • MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • 46208-28
    • 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'

      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

            samhemelryk Sam Hemelryk
            colin Colin Campbell
            Petr Skoda Petr Skoda
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jason Fowler Jason Fowler
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.