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

Refine policy around use of set_config inside transactions - eg coding_exception?

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Future Dev
    • Libraries, Policy

      If you open a transaction, then call set_config, it updates MUC, then you rollback the transaction now you have inconsistent state between the config table and MUC.

      It isn't clear if this is happening (we are collecting some data on this) so it may be a moot point. But it would be to clarify whether this is allowed. I think this should throw a coding_exception because I don't think it can ever be inferred automatically what the correct behaviors should be.

      Some ideas thrown around:

      1) set MUC, but defer writing the DB until the shutdown handler - still means it is inconsistent if the process takes some time

      2) detect transaction rollback and then set it again - ugly

      I think it is simpler to just say that config must be set after it is closed or rolled back.

            Unassigned Unassigned
            brendanheywood Brendan Heywood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

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