[ 
https://issues.apache.org/jira/browse/PROTON-2818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17843788#comment-17843788
 ] 

ASF GitHub Bot commented on PROTON-2818:
----------------------------------------

cliffjansen commented on code in PR #427:
URL: https://github.com/apache/qpid-proton/pull/427#discussion_r1591273502


##########
c/src/proactor/epoll.c:
##########
@@ -1139,6 +1141,21 @@ static pn_event_batch_t 
*pconnection_process(pconnection_t *pc, uint32_t events,
   }
   if (sched_ready) schedule_done(&pc->task);
 
+  if (pc->first_schedule) {
+    // Normal case: resumed logic from pn_proactor_connect2.
+    // But possible tie: pn_connection_wake() or pn_proactor_disconnect().

Review Comment:
   Not a typo but obviously not clear.  While the original logic is preserved 
as much as possible, the dropping of the task lock and context switch allows 
competitor threads that were not possible prior to this change.  Either of 
those two calls are possible from an arbitrary thread between the setting of 
first_schedule and arriving at this code.
   
   A comment which doesn't make sense on its own is obviously not helpful.  I 
will try to rework the comments and code structure for clarity on their own.
   





> Move epoll proctor connection logic to a task thread
> ----------------------------------------------------
>
>                 Key: PROTON-2818
>                 URL: https://issues.apache.org/jira/browse/PROTON-2818
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.39.0
>            Reporter: Clifford Jansen
>            Assignee: Clifford Jansen
>            Priority: Major
>
> See PROTON-2812.  Implement the first described mitigation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to