mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Dequeue the vm with the largest id first -- this ensures that newly started vms get updated early
This commit is contained in:
parent
925f5f2f09
commit
d81bc5a375
@ -39,8 +39,8 @@ import com.cloud.network.security.SecurityGroupWork.Step;
|
||||
public class LocalSecurityGroupWorkQueue implements SecurityGroupWorkQueue {
|
||||
protected static Logger s_logger = Logger.getLogger(LocalSecurityGroupWorkQueue.class);
|
||||
|
||||
protected Set<SecurityGroupWork> _currentWork = new HashSet<SecurityGroupWork>();
|
||||
//protected Set<SecurityGroupWork> _currentWork = new TreeSet<SecurityGroupWork>();
|
||||
//protected Set<SecurityGroupWork> _currentWork = new HashSet<SecurityGroupWork>();
|
||||
protected Set<SecurityGroupWork> _currentWork = new TreeSet<SecurityGroupWork>();
|
||||
|
||||
private final ReentrantLock _lock = new ReentrantLock();
|
||||
private final Condition _notEmpty = _lock.newCondition();
|
||||
@ -85,7 +85,9 @@ public class LocalSecurityGroupWorkQueue implements SecurityGroupWorkQueue {
|
||||
|
||||
@Override
|
||||
public int compareTo(LocalSecurityGroupWork o) {
|
||||
return this._instanceId.compareTo(o.getInstanceId());
|
||||
//return this._instanceId.compareTo(o.getInstanceId());
|
||||
return o.getInstanceId().compareTo(this.getInstanceId());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user