mooli tayer has uploaded a new change for review.

Change subject: core: bugfix in correlationId machanism
......................................................................

core: bugfix in correlationId machanism

In commit http://gerrit.ovirt.org/#/c/15795/16 a bug was
introduced causing certain commands to not log their
correlationId (see bug description comment). correlationId
must be written on thread local to get logged.

Change-Id: Ie416d6f48f6209985f3cae36566a475e7fa90963
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=987915
Signed-off-by: Mooli Tayer <mta...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
1 file changed, 9 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/25/20325/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 115eeed..5425388 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
@@ -181,10 +181,6 @@
         if (parameters.getParametersCurrentUser() != null) {
             setCurrentUser(parameters.getParametersCurrentUser());
         }
-        // correlation ID thread local variable is set for non multi-action
-        if (!parameters.getMultipleAction()) {
-            
ThreadLocalParamsContainer.setCorrelationId(parameters.getCorrelationId());
-        }
         setCorrelationId(parameters.getCorrelationId());
 
         Guid commandIdFromParameters = parameters.getCommandId();
@@ -2119,4 +2115,13 @@
     public void setQuotaChanged(boolean quotaChanged) {
         this.quotaChanged = quotaChanged;
     }
+
+    @Override
+    public void setCorrelationId(String correlationId) {
+        // correlation ID thread local variable is set for non multi-action
+        if (!_parameters.getMultipleAction()) {
+            ThreadLocalParamsContainer.setCorrelationId(correlationId);
+        }
+        super.setCorrelationId(correlationId);
+    }
 }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie416d6f48f6209985f3cae36566a475e7fa90963
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: mooli tayer <mta...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to