You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Marek Laca (Jira)" <ji...@apache.org> on 2021/05/31 13:00:00 UTC

[jira] [Updated] (QPID-8534) [Broker-J] Improper interruption of connection processing loop

     [ https://issues.apache.org/jira/browse/QPID-8534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marek Laca updated QPID-8534:
-----------------------------
    Summary: [Broker-J] Improper interruption of connection processing loop  (was: [Broker-J] Improper interuption of connection processing loop)

> [Broker-J] Improper interruption of connection processing loop
> --------------------------------------------------------------
>
>                 Key: QPID-8534
>                 URL: https://issues.apache.org/jira/browse/QPID-8534
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Broker-J
>            Reporter: Marek Laca
>            Priority: Minor
>              Labels: Broker, Connection, Java
>
> The network connection scheduler (NetworkConnectionScheduler class) contains a thread pool. IO-threads are polling jobs from the scheduler work queue and executing them. The connection job works in the loop. The loop is interrupted when there is not any data to process or all IO-threads are occupied.
> If the loop is interrupted then the IO-thread pushes the connection job back into the queue and picks the next job from the queue. It should ensure that any job is not abandoned and it is not waiting in the queue for ever.
> But when the number of jobs equals to the thread pool size then IO-thread stops processing the connection job, pushes it back into the queue and polls the same job again, again and again.
> The connection job could check whether is there any job in the scheduler queue. If the queue was not empty then the connection working loop would be interrupted and the thread could pick up another job. It would simplified the broker code significantly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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