[ https://issues.apache.org/jira/browse/UIMA-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751346#action_12751346 ]
Jörn Kottmann commented on UIMA-1540: ------------------------------------- Its always nice to refactore things, but I would like to keep the focus on finding the bugs related to this issue, if you think it should be refactored please open a new jira issue for that. The current status is that the implementation now uses a semaphore to wait for a free CAS. The change caused two new errors in my client which occur depending on the timing. Exception in thread "main" org.apache.uima.cas.CASRuntimeException: Data for Sofa feature setLocalSofaData(String) has already been set. at org.apache.uima.cas.impl.SofaFSImpl.setLocalSofaData(SofaFSImpl.java:105) at org.apache.uima.cas.impl.CASImpl.setSofaDataString(CASImpl.java:4102) at org.apache.uima.cas.impl.CASImpl.setDocumentText(CASImpl.java:4087) at Retag.main(Retag.java:89) or Exception in thread "main" java.lang.NullPointerException at Retag.main(Retag.java:89) To find these errors Jerry added a test TestUimaASExtended.testClientProcess which runs fine on my machine. I will now further investigate what could cause the issue and report back. Jörn > Uima AS client consumes too much CPU while waiting for a free CAS > ------------------------------------------------------------------ > > Key: UIMA-1540 > URL: https://issues.apache.org/jira/browse/UIMA-1540 > Project: UIMA > Issue Type: Bug > Components: Async Scaleout > Affects Versions: 2.2.2AS > Reporter: Jerry Cwiklik > Assignee: Jerry Cwiklik > Fix For: 2.3AS > > > The UIMA AS client enters a busy loop in the getCAS() in > BaseUIMAAsynchronousEngineCommon_impl. Since a CAS instance may not be > available for awhile, this code wastes CPU cycles by continuously testing for > null and trying again. Put the thread to sleep for some time before testing > for CAS availability again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.