From efb5f85aad9a7c6f7f7866eda520fac9b7b2c2be Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Wed, 24 Oct 2012 10:43:44 -0700 Subject: [PATCH] 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 --- .../com/cloud/agent/manager/ClusteredAgentManagerImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java b/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java index 93c3912df85..ace25a4604e 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; }