You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel May (JIRA)" <ji...@apache.org> on 2007/08/22 16:30:30 UTC
[jira] Created: (JCR-1077) Changelog not persisted during two phase
commit in prepare phase
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.
[jira] Commented: (JCR-1077) Changelog not persisted during two
phase commit in prepare phase
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ 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.