Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.2.2
-
None
Description
The handling of the error handling parameters of a CPE that has a Vinci remote Cas processor with its "service-access" deployment parameter set to "random" is buggy
If you set the error parameters to the following values:
<errorHandling>
<errorRateThreshold action="continue" value="10/1000" />
<maxConsecutiveRestarts action="continue" value="10"
waitTimeBetweenRetries="10000" />
<timeout max="600000" default="-1" />
</errorHandling>
It looks like, when the Vinci processor fails for some reason, the CPE intents gracefully to reconnect up to N times (N=10 which is the value of the maxConsecutiveRestarts parameter) which is the expected behaviour. But the "waitTimeBetweenRetries" delay is not used at all.
Apparently in the implementation of method:
private int attachToServices(boolean redeploy, String aServiceUri, int howMany,
ProcessingContainer aProcessingContainer) throws Exception;
of the class org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDeployer
the "sleepBetweenRetries" only occurs if the Vinci Cas processor is in "exclusive" mode.
On the contrary (random mode) the method calls directly the method
private synchronized boolean
activateProcessor(CasProcessorConfiguration aCasProcessorConfig,
String aService, ProcessingContainer aProcessingContainer, boolean redeploy);
Which uses a hard coded timeout of 1 sec (SLEEP_TIME) between each retries instead of the waitTimeBetweenRetries.
The bug has been confirmed by Jerry Cwiklik and he proposed the attached patch which solves the problem