You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Martijn Hendriks (JIRA)" <ji...@apache.org> on 2007/10/12 21:17:50 UTC

[jira] Commented: (JCR-204) Improve recoverability

    [ https://issues.apache.org/jira/browse/JCR-204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534363 ] 

Martijn Hendriks commented on JCR-204:
--------------------------------------

Currently we experienced difficulty with this issue and it is critical for us to fix it. (It occurs, well, too frequently that the search index gets behind due to a forced stop/crash and reindexing costs a couple of hours.)

Wouldn't it be possible to store the last persisted ChangeLog in the database like the clustering revisions? This information could be stored in the same db transaction that writes the real content. On startup, if the repository detects that it wasn't shut down cleanly due to the still present .lock file, it reads the last ChangeLog from the database and feeds it to the search index. The search index then is up-to-date again (see JCR-905). 

> Improve recoverability
> ----------------------
>
>                 Key: JCR-204
>                 URL: https://issues.apache.org/jira/browse/JCR-204
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: indexing, jackrabbit-core, observation, transactions
>         Environment: svn revision: 265028
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>            Priority: Minor
>
> Transactions in Jackrabbit are committed in SharedItemStateManager.store(). While the call to PersistenceManager.store() is by its definition atomic, updates on the index through synchronous notification by the ObservationManager are not. Consequently, it may happen that the index is not up-to-date with the workspace data in case of a crash.
> Consider the following cases:
> 1)
> - changes in a ChangeLog are successfully stored by the persistence manager
> - the observation manager notifies the query handler about the change
> - the query handler starts to update the index
> - system crashes
> -> the index is missing some changes
> 2)
> - changes in a ChangeLog are successfully stored by the persistence manager
> - system crashes
> -> the index is missing all changes
> To prevent situations like 1) the index must be fully transactional implementing ACID properties.
> In case an index update cannot be completed, the index will appear as if the update never happened. Which results in a situation described in example 2)
> To prevent situations like 2) the observation manager musts keep track of transactions and make sure that committed transactions (the ones that successfully stored the changes in the persistence manager) successfully notify all listeners. If the system should crash while listeners are notified the events must be re-delivered on restart.
> comments and suggestions on alternatives are welcome!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.