Arik Hadas has posted comments on this change. Change subject: engine: clear the pending memory when destroying paused VM ......................................................................
Patch Set 2: Code-Review-1 (2 comments) http://gerrit.ovirt.org/#/c/25271/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java: Line 315: TimeUnit.SECONDS.toMillis(Config.<Integer> getValue(VdsRefreshRate))); Line 316: t = Math.max(Config.<Integer> getValue(ConfigValues.ThrottlerMaxWaitForVdsUpdateInMillis), t); Line 317: Line 318: // wait for the run-time refresh to decrease any current powering-up VMs Line 319: VmHandler.getBlockingQueue(vdsId).poll(t, TimeUnit.MILLISECONDS); we don't really need to extract getBlockingQueue, as it is not needed by the stop command. Line 320: } catch (InterruptedException e) { Line 321: // ignore Line 322: } Line 323: } http://gerrit.ovirt.org/#/c/25271/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java: Line 83: static It is problematic to make this field static, because there can be a race between different run commands. the lastDecreasedVds should prevent run command from decreasing twice so it should be part of the run command's state. when it comes to stop we there can't be a flow where we decrease twice so we don't need such thing there. please extract only the part that stop vm command needs to this handler class. -- To view, visit http://gerrit.ovirt.org/25271 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1de34ac8b0b6e48d360161d8f0ff8d1fe4f6fd04 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Jiří Moskovčák <[email protected]> Gerrit-Reviewer: Arik Hadas <[email protected]> Gerrit-Reviewer: Doron Fediuck <[email protected]> Gerrit-Reviewer: Gilad Chaplik <[email protected]> Gerrit-Reviewer: Kobi Ianko <[email protected]> Gerrit-Reviewer: Martin Sivák <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
