[ https://issues.apache.org/jira/browse/DISPATCH-1310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16825237#comment-16825237 ]
ASF GitHub Bot commented on DISPATCH-1310: ------------------------------------------ kgiusti commented on pull request #492: DISPATCH-1310: refactor the receive handler code URL: https://github.com/apache/qpid-dispatch/pull/492#discussion_r278165794 ########## File path: src/container.c ########## @@ -642,8 +641,8 @@ void qd_container_handle_event(qd_container_t *container, pn_event_t *event, delivery = pn_event_delivery(event); pn_link = pn_event_link(event); - if (pn_link_is_receiver(pn_link)) - do_receive(delivery); + if (pn_delivery_readable(delivery)) Review comment: Turns out using pn_delivery_readable massively decreases the number calls to do_receive() that do nothing (i.e. check if delivery is current and returns since it isn't) in the case of single frame deliveries. The way do_receive() works is that loops over all deliveries that have rx complete starting with the links current delivery and advancing until it either exhausts the links deliveries or it hits a delivery that does not have rx data. This means that it processes all complete deliveries on receipt of the first PN_DELIVERY event from proton. That means all other complete rx has a "stale" PN_DELIVERY event on the event queue, which leads to the useless calls to do_receive. I'd like to keep this change unless as you mentioned there is some edge condition it breaks that's not obvious from the code (and should be). ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Move delivery settlement and disposition propagation out of the core thread > --------------------------------------------------------------------------- > > Key: DISPATCH-1310 > URL: https://issues.apache.org/jira/browse/DISPATCH-1310 > Project: Qpid Dispatch > Issue Type: Improvement > Components: Router Node > Affects Versions: 1.6.0 > Reporter: Ken Giusti > Assignee: Ken Giusti > Priority: Minor > Labels: delivery-refactor > > In the current design all changes to a delivery's disposition and settlement > state has to move through the core thread. > Contrast this with the data associated with a delivery (held in the message > content object) - data is moved between I/O threads without passing through > the core thread. > Moving the disposition and settlement state propagation to the I/O threads > (like delivery data) will simplify its synchronization (2 thread rather than > 3) and will (likely) improve performance. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org