Skip to content
Snippets Groups Projects
Commit 8a2941c4 authored by Guido Trotter's avatar Guido Trotter
Browse files

Processor: lock all levels even if one is missing

If a locking level wasn't specified locking used to stop. This means
that if one, for example, didn't specify anything at the LEVEL_INSTANCE
level, no locks at the LEVEL_NODE level were acquired either. With this
patch we force _LockAndExecLU to be called for all existing levels, and
break the recursion if the level doesn't exist in locking.LEVELS.

Reviewed-by: imsnah
parent 0fcc5db3
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,9 @@ class Processor(object): ...@@ -129,7 +129,9 @@ class Processor(object):
given LU and its opcodes. given LU and its opcodes.
""" """
if level in lu.needed_locks: if level not in locking.LEVELS:
result = self._ExecLU(lu)
elif level in lu.needed_locks:
# This gives a chance to LUs to make last-minute changes after acquiring # This gives a chance to LUs to make last-minute changes after acquiring
# locks at any preceding level. # locks at any preceding level.
lu.DeclareLocks(level) lu.DeclareLocks(level)
...@@ -146,7 +148,7 @@ class Processor(object): ...@@ -146,7 +148,7 @@ class Processor(object):
if lu.needed_locks[level]: if lu.needed_locks[level]:
self.context.glm.release(level) self.context.glm.release(level)
else: else:
result = self._ExecLU(lu) result = self._LockAndExecLU(lu, level + 1)
return result return result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment