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()) {
|
if (s_logger.isTraceEnabled()) {
|
||||||
s_logger.trace("Security Group Mgr: scheduling ruleset updates for " + affectedVms.size() + " vms");
|
s_logger.trace("Security Group Mgr: scheduling ruleset updates for " + affectedVms.size() + " vms");
|
||||||
}
|
}
|
||||||
|
if (affectedVms.size() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
boolean locked = _workLock.lock(_globalWorkLockTimeout);
|
boolean locked = _workLock.lock(_globalWorkLockTimeout);
|
||||||
if (locked) {
|
if (locked) {
|
||||||
if (s_logger.isTraceEnabled()) {
|
if (s_logger.isTraceEnabled()) {
|
||||||
@ -382,7 +385,7 @@ public class SecurityGroupManagerImpl implements SecurityGroupManager, SecurityG
|
|||||||
try {
|
try {
|
||||||
for (Long vmId : affectedVms) {
|
for (Long vmId : affectedVms) {
|
||||||
if (s_logger.isTraceEnabled()) {
|
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;
|
VmRulesetLogVO log = null;
|
||||||
SecurityGroupWorkVO work = null;
|
SecurityGroupWorkVO work = null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user