Corrected ServiceProcessor shutdown sequence
@@ -281,9 +281,9 @@ public class GridServiceProcessor extends GridProcessorAdapter implements Ignite
if (ctx.isDaemon())
return;
+ // Will not release it.
busyLock.block();
- try {
U.shutdownNow(GridServiceProcessor.class, depExe, log);
if (!ctx.clientNode())
@@ -327,10 +327,6 @@ public class GridServiceProcessor extends GridProcessorAdapter implements Ignite
cancelFutures(depFuts, err);
cancelFutures(undepFuts, err);
- }
- finally {
- busyLock.unblock();
- }
if (log.isDebugEnabled())
log.debug("Stopped service processor.");
@@ -465,7 +461,8 @@ public class GridServiceProcessor extends GridProcessorAdapter implements Ignite
* @param affKey Affinity key.
* @return Future.
*/
- public IgniteInternalFuture<?> deployKeyAffinitySingleton(String name, Service svc, String cacheName, Object affKey) {
+ public IgniteInternalFuture<?> deployKeyAffinitySingleton(String name, Service svc, String cacheName,
+ Object affKey) {
A.notNull(affKey, "affKey");
ServiceConfiguration cfg = new ServiceConfiguration();
@@ -1510,10 +1507,6 @@ public class GridServiceProcessor extends GridProcessorAdapter implements Ignite
if (!busyLock.enterBusy())
return;
- //Must check that threadpool was not shutdown.
- if (depExe.isShutdown())
- return;
-
try {
final AffinityTopologyVersion topVer;
@@ -1726,7 +1719,6 @@ public class GridServiceProcessor extends GridProcessorAdapter implements Ignite
undeploy(e.getKey().name());
}
-
/**
* @param name Name.
*/
