Skip to content
ID

Storage

MF-AutoRestart uses one SQLite database:

plugins/MF-AutoRestart/data.db

There is no configurable alternative storage backend in the delivered source.

The schema contains three tables:

Table Purpose
schema_version Stores the plugin database schema version.
dynamic_schedules Stores schedules created with /ar schedule add ....
restart_logs Records completed, cancelled, or aborted restart outcomes.

Dynamic schedule rows store:

id
type
day_of_week
time_str

Restart log rows store:

timestamp
trigger_type
status

Observed trigger values written by the source are AUTOMATIC and MANUAL. Observed status values are COMPLETED, CANCELLED, and ABORTED.

Database operations are serialized through a dedicated single-thread executor. Startup opens/initializes SQLite asynchronously before the plugin enters its ready state.

MF-AutoRestart requires SQLite rollback-journal DELETE mode.

The source:

  1. inspects the existing journal_mode;
  2. if it is wal, asks SQLite to run wal_checkpoint(TRUNCATE);
  3. asks SQLite to switch to journal_mode=DELETE;
  4. closes the migration connection;
  5. fails startup if data.db-wal or data.db-shm still exists;
  6. opens the normal runtime connection and verifies journal_mode=DELETE again.

The plugin does not manually delete WAL or SHM recovery sidecars.

With rollback-journal DELETE mode, SQLite may temporarily create:

data.db-journal

while a transaction is active. That file is not WAL/SHM and is part of SQLite rollback-journal operation.

The delivered source uses schema version 1. It initializes the schema version record when absent and rejects a database whose recorded schema version is newer than the plugin supports.

The source does not define a separate administrator migration command.

MF-AutoRestart does not provide its own backup command. The safest operational boundary exposed by the plugin is a normal server stop/disable, which closes the SQLite connection asynchronously as part of shutdown.

Do not manually delete data.db-wal or data.db-shm as a recovery technique. The plugin intentionally fails closed if SQLite cannot retire those files during the WAL-to-DELETE transition.