You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ch...@apache.org on 2014/09/08 21:39:38 UTC
svn commit: r1623509 -
/uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java
Author: challngr
Date: Mon Sep 8 19:39:37 2014
New Revision: 1623509
URL: http://svn.apache.org/r1623509
Log:
UIMA-3988 Remember to decrease instance count if pinger stops an instance so
autorun doesn't restart it.
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java?rev=1623509&r1=1623508&r2=1623509&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java Mon Sep 8 19:39:37 2014
@@ -524,7 +524,7 @@ public class ServiceSet
if ( init_failures >= init_failure_max ) return; // too many init failures, no more enforcement
if ( ping_failures >= ping_failure_max ) return; // not pinging, let's not start more stuff
- // could have more implementors than instances if some were started dynamically but the count not persisted
+ // could have more implementors than instances if some were started dynamically but the count not persisted via registration
int needed = Math.max(0, instances - countImplementors());
if ( needed > 0 ) {
logger.info(methodName, id, "Autostarting", needed, "instance" + ((needed > 1) ? "s" : ""), "already have", countImplementors());
@@ -1133,6 +1133,7 @@ public class ServiceSet
}
for ( int i = 0; i < ndeletions; i++ ) {
+ instances = Math.max(0, instances - 1); // prevent autostart and error handling from restarting things
stop(deletions[i]);
}