Skip to content

Compromised locks #11

Closed
Closed

Description

@matteocontrini

Hi,
can you please explain what "compromised locks" are?
Also, in the README, the lock signature shows that there are two callbacks, compromised and callback but I don't see any example of usage of compromised. Instead, from what I undestand, a single callback is always used (err, release).

Thank you

Activity

  1. satazor commented on Feb 21, 2016

    @satazor
    Contributor

    Hi.

    Indeed it should be explained better! Basically, compromised is a function that is called whenever the lock is no longer safe (default implementation simply throws an error, causing the process to exit).

    These are edge cases but they might happen if there are huge delays updating the lockfile (e.g. slow nfs disk). If the time took to update the lockfile is greater than the staleness duration, the lock might have been acquired by another process, hence compromised.

    I would like to have that explained better in the README. Would you want to do a PR with a better explanation? Thanks

  2. satazor commented on Mar 29, 2016

    @satazor
    Contributor

    Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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