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?



    • Type: Sub-task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: STABLE backlog
    • Component/s: Backup
    • Labels:
    • Affected Branches:


      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.



          Issue Links



              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: