[
https://issues.apache.org/jira/browse/JCR-3406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431101#comment-13431101
]
Thomas Mueller commented on JCR-3406:
-------------------------------------
Proposed patch:
{code}
Index: src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
===================================================================
--- src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
(revision 1370130)
+++ src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
(working copy)
@@ -665,10 +665,6 @@
* {@inheritDoc}
*/
public void updateCommitted(Update update, String path) {
- if (status != STARTED) {
- log.info("not started: update commit ignored.");
- return;
- }
Record record = (Record) update.getAttribute(ATTRIBUTE_RECORD);
if (record == null) {
String msg = "No record prepared.";
@@ -705,10 +701,6 @@
* {@inheritDoc}
*/
public void updateCancelled(Update update) {
- if (status != STARTED) {
- log.info("not started: update cancel ignored.");
- return;
- }
Record record = (Record) update.getAttribute(ATTRIBUTE_RECORD);
if (record != null) {
record.cancelUpdate();
{code}
> Journal doUnlock sometimes not called on repository shutdown
> ------------------------------------------------------------
>
> Key: JCR-3406
> URL: https://issues.apache.org/jira/browse/JCR-3406
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
>
> When the repository is shut down, the method AbstractJournal.doUnlock(boolean
> successful) is sometimes not called. The method Journal.close is called, but
> when the journal implementation uses a reentrant lock it can't unlock because
> close is called from a different thread.
> The reason for not calling doUnlock is that ClusterNode.stop() sets the
> status to "stopped", which causes all WorkspaceUpdateChannel methods to not
> work, including updateCommitted and updateCancelled. Therefore, it is
> possible that an operation is started but never completed nor cancelled.
> To solve the issue, I found that it is enough to let updateCommitted and
> updateCancelled to complete, so that operations that are in progress can
> finish.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira