Fix interleaved repo delete with RAC via a transaction
The RepositoryActionCount table can have entries added while a repository deletion is in progress. We now perform the repository deletion under a transaction and explicitly test for RAC entries in the deletion unit test (which doesn't test interleaving, but it was missing this check). Fixes #494
This commit is contained in:
parent
d6f4e0c7b2
commit
30379a2dd8
3 changed files with 36 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
from data.database import db
|
||||
from data.database import db, db_transaction
|
||||
|
||||
|
||||
class DataModelException(Exception):
|
||||
|
@ -80,10 +80,6 @@ class Config(object):
|
|||
config = Config()
|
||||
|
||||
|
||||
def db_transaction():
|
||||
return config.app_config['DB_TRANSACTION_FACTORY'](db)
|
||||
|
||||
|
||||
# There MUST NOT be any circular dependencies between these subsections. If there are fix it by
|
||||
# moving the minimal number of things to _basequery
|
||||
# TODO document the methods and modules for each one of the submodules below.
|
||||
|
|
Reference in a new issue