Liron Aravot has posted comments on this change. Change subject: CommandBase - persist command if the parent command has a callback ......................................................................
Patch Set 11: (1 comment) https://gerrit.ovirt.org/#/c/41696/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java: Line 1367: VdcActionType parentCommand = getParameters().getParentCommand(); Line 1368: if (parentCommand != VdcActionType.Unknown && parentCommand != getActionType()) { Line 1369: CommandEntity commandEntity = Line 1370: CommandCoordinatorUtil.getCommandEntity(getParameters().getParentParameters().getCommandId()); Line 1371: return commandEntity != null && commandEntity.isCallbackEnabled(); > shouldn't it be the opposite ? to persist the command only if it isn't exis please take a look at line 1368 (old code), before this patch the command is persisted only in case it has a callback (we don't always persist commands) - so a command isn't always persisted. This patch changes that so in case the parent command has a callback an executed command will be persisted as well (as the parent callback will monitor it). as the parent may not be persisted (if it doesn't have a callback) this check is required. Line 1372: } Line 1373: Line 1374: return false; Line 1375: } -- To view, visit https://gerrit.ovirt.org/41696 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If15fad1db94e7a0bdc51d02afc9b952b4e980e4b Gerrit-PatchSet: 11 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <[email protected]> Gerrit-Reviewer: Greg Padgett <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Ravi Nori <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
