[
https://issues.apache.org/jira/browse/GEODE-8286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17140754#comment-17140754
]
John Blum edited comment on GEODE-8286 at 2/11/22, 1:24 AM:
------------------------------------------------------------
Of course, changing the registration of the Geode, JVM Shutdown Hook to
"opt-in" rather than the currently positioned "opt-out" would constitute a
change in behavior that could adversely affect users.
This would be an acceptable change in a major version.
The only other alternative is if Geode provided an SPI that made it context
aware.
was (Author: jblum):
Of course, changing the registration of the Geode, JVM Shutdown Hook to
"opt-in" rather than the currently positioned, "opt-out", is a change in
behavior could adversely affect users.
This would be an acceptable change in a major version.
The only other alternative is if Geode provided an SPI that made it context
aware.
> The Geode JVM Shutdown Hook should not be enabled by default
> ------------------------------------------------------------
>
> Key: GEODE-8286
> URL: https://issues.apache.org/jira/browse/GEODE-8286
> Project: Geode
> Issue Type: Bug
> Components: configuration, general, management
> Reporter: John Blum
> Priority: Critical
> Labels: JSON-PDX
>
> Apache Geode registers a JVM Shutdown Hook in
> [InternalDistributedSystem|https://github.com/apache/geode/blob/rel/v1.12.0/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java#L2190-L2222]
> that ensures the Apache Geode Cache and associated DistributedSystem are
> shutdown properly when the JVM exits.
> However, this JVM Shutdown Hook and interfere with Frameworks and Tooling
> that have their own Lifecycle Management capabilities. The Spring Framework
> and Container is one such example.
> Any managed environment, be that Micronaut, Quarkus, Pivotal Platform
> (PCF/TAS), Kubernetes, AWS, Azure, GCP, etc, etc, are going to have lifecycle
> management capabilities.
> It is very important that the environment manage the lifecycle of all actors
> in the fully "integrated" system.
> In Spring's case, it must coordinate the lifecycle of application components
> along with integrated systems, like Geode, in an effort to shut all
> components down in a coordinated, correct fashion.
> If Geode's JVM Shutdown Hook is permitted to do as it pleases, then this can
> circumvent the Framework/Container, Tool, or other's lifecycle management
> capabilities, leaving the system or application in an inconsistent/incorrect
> state.
> To make matters worse, the [JVM System
> Property|https://github.com/apache/geode/blob/rel/v1.12.0/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java#L2191]
> (and specifically,
> [this|https://github.com/apache/geode/blob/rel/v1.12.0/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java#L391-L392])
> controlling the enablement of the JVM Shutdown Hook, is non-public and [not
> documented|https://geode.apache.org/docs/guide/112/reference/topics/gemfire_properties.html].
--
This message was sent by Atlassian Jira
(v8.20.1#820001)