jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-8521) Add shutdown hook for oak-run commands
Date Tue, 06 Aug 2019 13:04:00 GMT

    [ https://issues.apache.org/jira/browse/OAK-8521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16901016#comment-16901016
] 

Marcel Reutegger edited comment on OAK-8521 at 8/6/19 1:03 PM:
---------------------------------------------------------------

The changes look good to me, except for the {{RevisionsCommand}}. This command already has
a shutdown hook and none of the sub-commands constructs a read-write DocumentNodeStore. In
this case there's no adverse effect when the DocumentNodeStore is not closed when the process
ends. In fact, the proposed shutdown hook for the closer causes an exception when a QUIT signal
is sent to a running {{revisions collect --continuous}} command.


was (Author: mreutegg):
The changes look good to me, except for the {{RevisionsCommand}}. This command already has
a shutdown hook and none of the sub-commands constructs a read-write DocumentNodeStore. In
this case there's no adverse effect when the DocumentNodeStore is not closed when the process
ends. In fact, the proposed shutdown hook for the closer causes an exception when a QUIT signal
is sent to a running {{revisions collect}} command.

> Add shutdown hook for oak-run commands
> --------------------------------------
>
>                 Key: OAK-8521
>                 URL: https://issues.apache.org/jira/browse/OAK-8521
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk, run
>            Reporter: Vinod Holani
>            Assignee: Marcel Reutegger
>            Priority: Minor
>         Attachments: OAK-8521.patch
>
>
> Ensure there are shutdown hooks in place for the various oak-run commands that properly
stop the repository and release the clusterId.
> Many command construct a repository, then perform some operation and then shut down the
repository again. Shutting down the repository will release the clusterId change the state
of the clusterNodes entry back to inactive. In some cases commands execute for a longer period
of time and a user might kill the process. When this happens, the clusterId is not released
and stays in the active state with a lease that eventually expires. The command implementations
should be improved to register a JVM shutdown hook that ensures the repository is shut down,
even when the process is killed.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message