Michael Kublin has uploaded a new change for review.

Change subject: engine: Performance improvement in clean up compensation data
......................................................................

engine: Performance improvement in clean up compensation data

If the command is running with out compensation context no need to clean it.
In memory check is much more faster than call to db

Change-Id: Ieb256db6415c8fd5f45fcee5bae984739e61fec3
Signed-off-by: Michael Kublin <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/78/11878/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
index 3c83ab8..e9bce6f 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
@@ -415,7 +415,9 @@
      * Delete the compensation data, so that we don't accidentaly try to 
compensate it at a later time.
      */
     private void cleanUpCompensationData() {
-        getBusinessEntitySnapshotDAO().removeAllForCommandId(commandId);
+        if (!(getCompensationContext() instanceof NoOpCompensationContext)) {
+            getBusinessEntitySnapshotDAO().removeAllForCommandId(commandId);
+        }
     }
 
     public VdcReturnValueBase endAction() {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb256db6415c8fd5f45fcee5bae984739e61fec3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to