Project

General

Profile

Actions

action #6406

closed

staging locks: stepping on ones own foot

Added by dimstar about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
2015-02-24
Due date:
% Done:

0%

Estimated time:

Description

Currently, osc staging sets a lock on a user, which is fine (avoiding a 2nd user to mess up)

Consider this though (all done as one user)

  • osc staging freeze A (this is a lengthy task, usually about 3 - 5 minutes)
  • In the same time, the same user who has the lock opens a new term and issues osc staging list

The 2nd call is permitted (the lock is owned by the user, so accepted to continue). yet, once the 2nd call terminates, the lock is being removed, despite task 1 still being ative.

Two options:

  • Either disallow the ame user from running two commands in parallel (we can live with that)
  • Ensure that a 2nd command can't remove the first commands lock (adding a refcount?)
Actions #1

Updated by aplanas about 9 years ago

  • Status changed from New to In Progress

First option is more safe (the second option will allows two osc commands that change the same staging project at the same time):

https://github.com/aplanas/osc-plugin-factory/commit/1bedd81065f92f62cc5ccad5788dd7dfbe87a4e7

Actions #2

Updated by aplanas about 9 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF