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

lock_db table periodic maintenance / cleanup

XMLWordPrintable

    • MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE

      This was detected when processing MDL-65722.

      it seems that we never perform any cleanup of "expired" lock_db records and the table can grow and grow continuously.

      That table is used by the db_record_lock_factory and, until recently, also by the postgres_lock_factory.

      So, this issue is about to add some mechanism (scheduled tasks?) to the system in order to:

      1) remove all the "expired" records in the table, they are not needed anymore, db_record_lock_factory ended needing them.

      2) remove all the records without "expired" information, they were used by postgres_lock_factory and, since MDL-65722 (3.9 only!) they are not used.

      ^^^ Maybe do these cleanups with an 1-day delay or so (will require annotating numbers periodically I imagine) so other uses are not borked. Just imagining

      3) document this in upgrade.txt as far as anybody else out there using that table may face problems if we start cleaning them.

      Surely master only as far as MDL-65722 (that enables us to do 2) is master only. Unless we find a way of guarantee the records are there for 1-day or so, as commented above.

      Ciao

            Unassigned Unassigned
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            7 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:

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