Skip to content

backup: Backup plugin gets out of sync if init doesn't complete #155

@cdecker

Description

@cdecker

Occasionally I get an emergency shutdown from the backup plugin:

2020-11-11T10:20:18.023Z INFO    plugin-backup.py: Comparing backup version 1308057 versus first write version 1308060
2020-11-11T10:20:18.023Z INFO    plugin-backup.py: Backup is out of date, we cannot continue safely. Emergency shutdown.
2020-11-11T10:20:18.034Z INFO    plugin-summary.py: Plugin summary.py initialized
2020-11-11T10:20:19.026Z INFO    plugin-backup.py: Killing process lightningd (22862)

This is caused by an incomplete startup, in which the plugin started
buffering the pre-init db_writes but then couldn't flush them on
init. Since 97c7027 we are writing the backup.lock file which
contains all the necessary information for us to start writing the
changes to the backup right away and don't have to wait for the init
message (previously needed to get CLI arguments).

We should really just be reading this file and start writing the
changes to the file without buffering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions