You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2019/10/25 13:11:15 UTC

[qpid-dispatch] branch master updated: DISPATCH-1460: do not allow Q2 holdoff on router control links

This is an automated email from the ASF dual-hosted git repository.

kgiusti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
     new f93d70c  DISPATCH-1460: do not allow Q2 holdoff on router control links
f93d70c is described below

commit f93d70c8117e45d12e0dfced5965dd1b988ee1a8
Author: Kenneth Giusti <kg...@apache.org>
AuthorDate: Thu Oct 24 16:30:00 2019 -0400

    DISPATCH-1460: do not allow Q2 holdoff on router control links
    
    Q2 holdoff is a flow control mechanism that limits the amount of
    router memory a single message can occupy while it is being forwarded.
    This prevents a client from consuming too much message buffer memory
    should the consumer back up.
    
    However, inter-router control messages can exceed the Q2 limit if
    there are a large number of link addresses present in the router mesh.
    Since these messages are consumed locally and must be fully received
    before they are consumed, enabling Q2 flow control can cause the
    message (and link) to permanently stall on large control message.
    
    This closes #598
---
 src/router_core/transfer.c | 2 +-
 src/router_node.c          | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index 3ee9843..1c0a4b8 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -620,7 +620,7 @@ static void qdr_link_forward_CT(qdr_core_t *core, qdr_link_t *link, qdr_delivery
             // deliveries because it increases the risk of credit starvation if there
             // are many addresses sharing the link.
             //
-            if (link->link_type == QD_LINK_ROUTER || link->edge)
+            if (link->link_type == QD_LINK_CONTROL || link->link_type == QD_LINK_ROUTER || link->edge)
                 qdr_link_issue_credit_CT(core, link, 1, false);
         }
     }
diff --git a/src/router_node.c b/src/router_node.c
index 7613afd..9f9d753 100644
--- a/src/router_node.c
+++ b/src/router_node.c
@@ -1372,6 +1372,14 @@ static void CORE_link_first_attach(void             *context,
     pn_link_open(qd_link_pn(qlink));
 
     //
+    // All links on the inter router or edge connection have unbounded q2 limit.
+    // Blocking control messages can lead to various failures
+    //
+    if (qdr_connection_role(conn) == QDR_ROLE_EDGE_CONNECTION || qdr_connection_role(conn) == QDR_ROLE_INTER_ROUTER) {
+        qd_link_set_q2_limit_unbounded(qlink, true);
+    }
+
+    //
     // Mark the link as stalled and waiting for initial credit.
     //
     if (qdr_link_direction(link) == QD_OUTGOING)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org