You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by bu...@apache.org on 2018/02/28 14:47:29 UTC
svn commit: r1825572 -
/uima/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java
Author: burn
Date: Wed Feb 28 14:47:29 2018
New Revision: 1825572
URL: http://svn.apache.org/viewvc?rev=1825572&view=rev
Log:
UIMA-5390 Since setAutostart is called on every ping response don't reset error counts if autostart already set
Modified:
uima/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java
Modified: uima/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java?rev=1825572&r1=1825571&r2=1825572&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java (original)
+++ uima/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceSet.java Wed Feb 28 14:47:29 2018
@@ -631,9 +631,7 @@ public class ServiceSet
synchronized void setAutostart(boolean auto)
{
- meta_props.setProperty(IStateServices.SvcMetaProps.autostart.pname(), auto ? "true" : "false");
- this.autostart = auto;
- if ( auto ) {
+ if (!this.autostart && auto) { // UIMA-5390 Restrict these resets to only if autostart was off but is now on
// turning this on gives benefit of the doubt on failure management
// by definition, an autostarted services is NOT reference started
cancelLinger();
@@ -641,6 +639,8 @@ public class ServiceSet
init_failures = 0;
resetRuntimeErrors();
}
+ meta_props.setProperty(IStateServices.SvcMetaProps.autostart.pname(), auto ? "true" : "false");
+ this.autostart = auto;
}
synchronized void restartPinger()
@@ -1490,7 +1490,7 @@ public class ServiceSet
disable(disable_reason);
save_meta = true;
} else {
- logger.warn(methodName, id, "Instance", inst_id + ": Uunsolicited termination, not yet excessive. Restarting instance.");
+ logger.warn(methodName, id, "Instance", inst_id + ": Unsolicited termination, not yet excessive. Restarting instance.");
start();
return; // don't use termination to set state - start will signal the state machine
}