jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1077) Changelog not persisted during two phase commit in prepare phase
Date Wed, 22 Aug 2007 15:00:31 GMT

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

Thomas Mueller commented on JCR-1077:
-------------------------------------

My suggestion would be to implement a 'write ahead log'. If a transaction spans over multiple
'Jackrabbit resources', even a regular commit (even when not using XA) could use this facility.
('Jackrabbit resource' meaning a persistence manager, and a search index).

- On a regular commit, the change log and a 'commit command' is added to the log (before persisting
the changes in the persistence managers)

- On a XA prepare, the change log and a 'prepare command' is written.

- On a rollback of a prepared transaction, a 'rollback command' is written.

The XA recovery scan could then scan the log file and return the list of prepared transactions.
On a regular restart, this log is scanned and changes (re-) applied to the Jackrabbit resources.


> Changelog not persisted during two phase commit in prepare phase 
> -----------------------------------------------------------------
>
>                 Key: JCR-1077
>                 URL: https://issues.apache.org/jira/browse/JCR-1077
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jca
>    Affects Versions: 1.3.1
>            Reporter: Marcel  May
>
> Currently, in a XA TX the changelog is only kept in memory in the prepare phase and therefore
potentially lost before the final commit phase finishes.
> A successful prepare() guarantees the persistence of the changes so that in the following
commit() phase the changes are made public.
> Solution could be serializing the ChangeLog between the phases and a final guaranteed
deletion upon commit (other ideas?)
> See previous discussion at http://www.mail-archive.com/dev@jackrabbit.apache.org/msg06525.html

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


Mime
View raw message