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

lib/google uses make_temp_directory incorrectly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.7.7, 2.8.5, 2.9
    • Fix Version/s: None
    • Component/s: Libraries, Repositories
    • Labels:
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE

      Description

      make_temp_directory:

      1. must only be used for per-request connections; and
      2. is shared in a clustered environment.

      In lib/google/lib.php it is used to set a class config value for the Google_Cache_File class.

      At the top of that class, it states:

      /*
       * This class implements a basic on disk storage. While that does
       * work quite well it's not the most elegant and scalable solution.
       * It will also get you into a heap of trouble when you try to run
       * this in a clustered environment.
       *
       * @author Chris Chabot <chabotc@google.com>
       */
      

      We should check whether we need this at all, and if we do see if we can use either one of:

      1. make_request_directory; or
      2. make_localcache_directory; or
      3. make_cache_directory.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dobedobedoh Andrew Nicols
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: