You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org> on 2019/01/18 21:49:00 UTC

[jira] [Reopened] (UIMA-5965) UIMA-DUCC: pullservice client protocol handler synchronization not working

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

Jerry Cwiklik reopened UIMA-5965:
---------------------------------

Looks like there is another problem with the synchronization. The task allocator can segment tasks based on service type. So for one type of service tasks may be available while for other types of services there are no tasks at a moment. The protocol handler synchronizes access for all type of services, forcing all request threads to block if current request thread gets no task.

Refactor code to use dedicated lock per service type. Store each lock in a map with service type as a key. Then get a lock for the service type, lock access to task allocator and try to fetch the task. With this design request threads from multiple service types can execute concurrently without blocking each other.

> UIMA-DUCC: pullservice client protocol handler synchronization not working
> --------------------------------------------------------------------------
>
>                 Key: UIMA-5965
>                 URL: https://issues.apache.org/jira/browse/UIMA-5965
>             Project: UIMA
>          Issue Type: Bug
>          Components: DUCC
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>            Priority: Major
>             Fix For: 2.2.3-Ducc
>
>
> The getMetaMetaTask() method synchronization is not working as expected. The retry loop uses java wait() which does not lock the method and allows multiple threads to run concurrently. Use Thread.currentThread().sleep() instead



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)