Arik Hadas has uploaded a new change for review.

Change subject: core: do not handle crashed VM twice
......................................................................

core: do not handle crashed VM twice

We used to save the VMs which moves to Down in a List which means that
theoretically we can have duplicated VMs in the List. Because of bz
1099846, we might get into a situation where VM will be in the List
twice.

Before extracting the handling of the VMs that went down to separate
thread, it is important to make sure we have each VM stored in this
collection only one, so we won't invoke redundant threads. So the
solution is to change the List to be Set, so it will not store
duplicated values.

Change-Id: I913cf18ad341090f3ed1df5acda93b372af7ab4d
Bug-Url: https://bugzilla.redhat.com/1098791
Signed-off-by: Arik Hadas <aha...@redhat.com>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/69/28769/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
index 114499d..281429e 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
@@ -103,7 +103,7 @@
     private final List<VmDynamic> _poweringUpVms = new ArrayList<>();
     private final List<Guid> _vmsToRerun = new ArrayList<>();
     private final List<Guid> _autoVmsToRun = new ArrayList<>();
-    private final List<Guid> _vmsMovedToDown = new ArrayList<>();
+    private final Set<Guid> _vmsMovedToDown = new HashSet<>();
     private final List<Guid> _vmsToRemoveFromAsync = new ArrayList<>();
     private final List<Guid> _succededToRunVms = new ArrayList<>();
     private static final Map<Guid, Integer> vmsWithBalloonDriverProblem = new 
HashMap<>();


-- 
To view, visit http://gerrit.ovirt.org/28769
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I913cf18ad341090f3ed1df5acda93b372af7ab4d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to