Skip to content
Snippets Groups Projects

allow committing transaction without a lock file

Open Andrew Gregory requested to merge andrew/nolock into master
1 unresolved thread

This is useful to allow front-ends to manage the lock file themselves, allowing them to ensure database consistency across multiple commands, e.g.:

 paclock --lock
 pacinstall --no-lock foo
 # foo is guaranteed to be installed until the db is unlocked
 paclock --unlock
Edited by Andrew Gregory

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Andrew Gregory changed the description

    changed the description

    • Author Maintainer

      Example isn't great, but it illustrates the intent. I think expecting front-ends to be responsible about committing with FLAG_NOLOCK is reasonable, but if we're worried about accidents, we could add a separate flag.

    • I am interested in this, but also rather cautious! I'm going to propose something a bit more complex... Considerations I am thinking on:

      • If a lock file is found, it is because another process has locked the database and still working, or is it a left over file
      • Should FLAG_NOLOCK require a lock file is already in place?

      We currently write the PID to the lock file, but I think we could write something useful here. E.g. a message of who created the lock file and when it was created?

    • Please register or sign in to reply
Please register or sign in to reply
Loading