Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-21432 META: Backup & restore 2.0
  3. MDL-25181

Should the backup controller be able to reopen a closed log to write to it?

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.0
    • Backup
    • MOODLE_20_STABLE

      This comes out of MDL-22184 where Eloy made the following comment:

      About your commented problems with the file logger (being closed) I think that is the "expected" behavior, as far as the idea was that the controllers, once saved to DB remain "locked" until they are loaded again. There are some comments in the controller pointing to that (although they are TODOs for now):

      // TODO: flag the controller as NA. Any operation on it should be forbidden util loaded back
      This affects the file_loggers that is "closed" on serialization (save_controller) and only "reopened" on unserialization (load_controller). Perhaps we could tweak that logger so, if the file is closed but exists and any log() call is performed... then reopen it on the fly. Or perhaps we should remain sticky about the save/load always having to be executed in pairs (implementing the lock properly).

      We should look into this and decide whether we are going to allow the backup controller to open a closed log and write to it, or whether we should force the controller to be loaded again.

      Cheers
      Sam

            Unassigned Unassigned
            samhemelryk Sam Hemelryk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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