[
https://issues.apache.org/jira/browse/DISPATCH-2184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17369478#comment-17369478
]
ASF GitHub Bot commented on DISPATCH-2184:
------------------------------------------
kgiusti commented on a change in pull request #1273:
URL: https://github.com/apache/qpid-dispatch/pull/1273#discussion_r658782755
##########
File path: src/router_node.c
##########
@@ -2108,10 +2112,6 @@ static void CORE_delivery_update(void *context,
qdr_delivery_t *dlv, uint64_t di
// and if it is blocked by Q2 holdoff, get the link rolling
again.
//
qd_message_Q2_holdoff_disable(msg);
-
- qd_link_t_sp *safe_ptr = NEW(qd_link_t_sp);
- set_safe_ptr_qd_link_t(link, safe_ptr);
- qd_connection_invoke_deferred(qd_conn,
deferred_AMQP_rx_handler, safe_ptr);
Review comment:
The change to qd_message_Q2_holdoff_disable() now calls it automagically
only if necessary (actually in Q2 block). If you look at qd_message_receive()
you'll see where qd_message_set_q2_unblocked_handler() is called to register
the deferred_AMQP_rx_handler when the message is first created.
With this change we don't have to take the extra step to explicitly schedule
the handler every time we want to disable Q2.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> message receiver is not restarted by qd_message_Q2_holdoff_disable
> ------------------------------------------------------------------
>
> Key: DISPATCH-2184
> URL: https://issues.apache.org/jira/browse/DISPATCH-2184
> Project: Qpid Dispatch
> Issue Type: Bug
> Components: Router Node
> Affects Versions: 1.16.0
> Reporter: Ken Giusti
> Assignee: Ken Giusti
> Priority: Critical
> Fix For: 1.16.0
>
>
> When a message needs to have its Q2 disabled - for discard or local consume -
> the qd_message_Q2_holdoff_disable() function is called. This function
> simply sets a flag in the message indicating Q2 is disabled.
> However, if Q2 is effect when qd_message_Q2_holdoff_disable() is called the
> message's incoming thread is not activated. This may cause the receipt of
> the message to stall indefinitely.
> The qd_message_Q2_holdoff_disable() call must re-start the message's receiver
> thread if Q2 is in effect when called.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]