Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 535.7K On-Premises Infrastructure
- 138.1K Analytics Software
- 38.6K Application Development Software
- 5.6K Cloud Platform
- 109.3K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71K Infrastructure Software
- 105.2K Integration
- 41.5K Security Software
Best way to gracefully shut down a storage enabled node?

What's the best way to shutdown a storage enabled node? For example if I have backup-count = 0 and I don't want to lose data when reducing cluster size by 1 node. There does not appear to be a way in the coherence console. Is there a kill signal that the JVM will honor for this? Or an MBean operation I should use?
Best Answer
-
One can configure a shutdown hook of "graceful" in coherence operational configuration file. See attached file for an example.
Or one can configure "graceful" shutdown by starting cache server with system property of -Dtangosol.coherence.shutdownhook=graceful.
As long as the kill of the cache server process is not with -9, the configured shutdown hook of graceful will call Cluster.shutdown().
Additional details are documented here for stopping cluster members from command line:
https://docs.oracle.com/cd/E18686_01/coh.37/e18677/cluster_lifecycle.htm#COHDG5473
********
A graceful shutdown can be accomplished via stopping the cache server programmatically calling DefaultCacheServer.shutdown().
Doc link for details: https://docs.oracle.com/cd/E18686_01/coh.37/e18677/cluster_lifecycle.htm#COHDG5474
Answers
-
You can shutdown the services via JMX or perform a regular kill of the process. The problem with a regular kill is the grace period given to killing the process.
With a graceful termination of the process or shutting down of the service the partitioned service attempts to transfer owned primary partitions out prior to shutdown.
-
One can configure a shutdown hook of "graceful" in coherence operational configuration file. See attached file for an example.
Or one can configure "graceful" shutdown by starting cache server with system property of -Dtangosol.coherence.shutdownhook=graceful.
As long as the kill of the cache server process is not with -9, the configured shutdown hook of graceful will call Cluster.shutdown().
Additional details are documented here for stopping cluster members from command line:
https://docs.oracle.com/cd/E18686_01/coh.37/e18677/cluster_lifecycle.htm#COHDG5473
********
A graceful shutdown can be accomplished via stopping the cache server programmatically calling DefaultCacheServer.shutdown().
Doc link for details: https://docs.oracle.com/cd/E18686_01/coh.37/e18677/cluster_lifecycle.htm#COHDG5474