You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2012/11/02 18:53:40 UTC

[5/6] git commit: CS-16594: when request is cancelled by the remote peer, in addition to cancelling the request, unblock the agent queue if the request is the current request

CS-16594: when request is cancelled by the remote peer, in addition to cancelling the request, unblock the agent queue if the request is the current request


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/efb5f85a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/efb5f85a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/efb5f85a

Branch: refs/heads/master
Commit: efb5f85aad9a7c6f7f7866eda520fac9b7b2c2be
Parents: a507796
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Wed Oct 24 10:43:44 2012 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Fri Nov 2 10:47:24 2012 -0700

----------------------------------------------------------------------
 .../agent/manager/ClusteredAgentManagerImpl.java   |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/efb5f85a/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java b/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
index 93c3912..ace25a4 100755
--- a/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
+++ b/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
@@ -581,6 +581,12 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
                             logD(data, "Cancel request received");
                         }
                         agent.cancel(cancel.getSequence());
+                        final Long current = agent._currentSequence;
+                        //if the request is the current request, always have to trigger sending next request in sequence,
+                        //otherwise the agent queue will be blocked
+                        if (req.executeInSequence() && (current != null && current == Request.getSequence(data))) {
+                            agent.sendNext(Request.getSequence(data));
+                        }
                         return;
                     }