Skip to content

improve stale lock handling #5654

@ThomasWaldmann

Description

@ThomasWaldmann

taken from #955 where this was suggested:

by @jdchristensen : However, if some kind of automated lock removal was desired, one idea would be for borg to update the timestamp on the lock every 5 minutes. Then a future borg process could break a lock if it found it older than, say, 10 minutes.

by @poelzi : The correct way to handle such locks is with a pid+machine id inside the lock and and timestamp couter that gets updated every minute. If there is no such process on the same machine: stale lock, remove. If the machineid is a foreign machine and the timestamp is not updated some minutes, remove lock. If the lock is updated, wait until cleared.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions