You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2007/02/20 08:21:05 UTC

[jira] Resolved: (DIRMINA-352) races in ExecutorFilter

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

Trustin Lee resolved DIRMINA-352.
---------------------------------

    Resolution: Fixed
      Assignee: Trustin Lee

I reverted back to the 'synchronized' version, which yields better performance, and therefore, no more race condition.

> races in ExecutorFilter
> -----------------------
>
>                 Key: DIRMINA-352
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-352
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 1.1.0
>         Environment: any
>            Reporter: Jacek Gerbszt
>         Assigned To: Trustin Lee
>         Attachments: executorfilter.diff
>
>
> You've got thread races in ExecutorFilter class. When the thread running ProcessEventRunnable is hanging up between polling the event and updating the processingCompleted flag, another thread has the chance to add new event and evaluate processingCompleted.compareAndSet() method in meantime. Now ProcessEventRunnable thread updates the flag and breaks the loop, but it's too late - no new task is scheduled. Added event stays n the queue waiting for the next event or timeout.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.