Revert scoped lock format
Recently scoped lock format was mistakenly changed
from "type_name:name:version" to "owner". New format
prevents simultaneuos modifications of different
artifacts by one tenant, because it locks the whole
tenant scope, not just a single artifact.
For this reason it's suggested to revert the format as
it was before.
Closes-bug: #1720139
Change-Id: I9dc26da85f424a4ced1ca232d1f33c548b602f0f
(cherry picked from commit d2ce390ca8
)
This commit is contained in:
parent
1f798c3116
commit
5c0139f2bc
|
@ -93,10 +93,9 @@ class Engine(object):
|
|||
filters.extend([('owner', 'eq:' + owner),
|
||||
('visibility', 'private')])
|
||||
|
||||
scope_id = owner
|
||||
if visibility == 'public':
|
||||
scope_id = "%s:%s:%s" % (type_name, name, version)
|
||||
|
||||
scope_id = "%s:%s:%s" % (type_name, name, version)
|
||||
if visibility != 'public':
|
||||
scope_id += ':%s' % owner
|
||||
lock = self.lock_engine.acquire(context, scope_id)
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue