mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 10884: do not lock if not necessary
This commit is contained in:
parent
5c543ffdb1
commit
fd1dbe9683
@ -374,6 +374,9 @@ public class SecurityGroupManagerImpl implements SecurityGroupManager, SecurityG
|
||||
if (s_logger.isTraceEnabled()) {
|
||||
s_logger.trace("Security Group Mgr: scheduling ruleset updates for " + affectedVms.size() + " vms");
|
||||
}
|
||||
if (affectedVms.size() == 0) {
|
||||
return;
|
||||
}
|
||||
boolean locked = _workLock.lock(_globalWorkLockTimeout);
|
||||
if (locked) {
|
||||
if (s_logger.isTraceEnabled()) {
|
||||
@ -382,7 +385,7 @@ public class SecurityGroupManagerImpl implements SecurityGroupManager, SecurityG
|
||||
try {
|
||||
for (Long vmId : affectedVms) {
|
||||
if (s_logger.isTraceEnabled()) {
|
||||
s_logger.trace("Security Group Mgr: scheduling ruleset updates for " + vmId);
|
||||
s_logger.trace("Security Group Mgr: scheduling ruleset update for " + vmId);
|
||||
}
|
||||
VmRulesetLogVO log = null;
|
||||
SecurityGroupWorkVO work = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user