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/09/10 15:39:29 UTC

[jira] Created: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Bundle cache is not rolled back when the storage of a ChangeLog fails
---------------------------------------------------------------------

                 Key: JCR-1117
                 URL: https://issues.apache.org/jira/browse/JCR-1117
             Project: Jackrabbit
          Issue Type: Bug
          Components: core
    Affects Versions: 1.3
            Reporter: Martijn Hendriks


The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. The SharedItemStateManager$Update.cancel() method uses these invalid bundle data.


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


[jira] Commented: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675360#action_12675360 ] 

Marcel Reutegger commented on JCR-1117:
---------------------------------------

Wouldn't it make more sense to move the call to clearBundleCache to AbstractBundlePersistenceManager? In the end any implementation that throws an exception on store(ChangeLog) should ensure the bundle cache consistency, right?

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3, 1.4, 1.5.0, 1.5.2
>            Reporter: Martijn Hendriks
>            Assignee: Martijn Hendriks
>         Attachments: JCR-1117-v2.patch, JCR-1117.patch, stacktrace.txt
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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


[jira] Updated: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Hendriks updated JCR-1117:
----------------------------------

    Description: 
The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

  was:
The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. The SharedItemStateManager$Update.cancel() method uses these invalid bundle data.



> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3
>            Reporter: Martijn Hendriks
>            Assignee: Martijn Hendriks
>         Attachments: JCR-1117.patch
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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


[jira] Commented: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526404 ] 

Martijn Hendriks commented on JCR-1117:
---------------------------------------

I think that this could be fixed by extending the CachingPersistenceManager interface by a method to clear the cache(s) for a certain set of ids. The SharedItemStateManager$Update.cancel() method should then call this method first if its persistence manager is a CachingPersistenceManager.

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.3
>            Reporter: Martijn Hendriks
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. The SharedItemStateManager$Update.cancel() method uses these invalid bundle data.

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


[jira] Issue Comment Edited: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12526731#action_12526731 ] 

martijnh edited comment on JCR-1117 at 2/19/09 11:54 PM:
-----------------------------------------------------------------

Here is a patch that clears the cache(s) of a caching persistence manager from the Update.cancel() method. The AbstractBundlepersistenceManager removes all given nodeIds from its bundle and missing cache.


      was (Author: martijnh):
    Hi,

Here is a patch that clears the cache(s) of a caching persistence manager from the Update.cancel() method. The AbstractBundlepersistenceManager removes all given nodeIds from its bundle and missing cache.

Best regards,

Martijn
  
> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3
>            Reporter: Martijn Hendriks
>            Assignee: Martijn Hendriks
>         Attachments: JCR-1117-v2.patch, JCR-1117.patch, stacktrace.txt
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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


[jira] Commented: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675535#action_12675535 ] 

Martijn Hendriks commented on JCR-1117:
---------------------------------------

Marcel, I think you are right. Furthermore, the "clearBundleCache" method should also clear the "missing" cache. I'll create a new patch.

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3, 1.4, 1.5.0, 1.5.2
>            Reporter: Martijn Hendriks
>            Assignee: Martijn Hendriks
>         Attachments: JCR-1117-v2.patch, JCR-1117.patch, stacktrace.txt
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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


[jira] Updated: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Hendriks updated JCR-1117:
----------------------------------

    Affects Version/s: 1.4
                       1.5.0
                       1.5.2

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3, 1.4, 1.5.0, 1.5.2
>            Reporter: Martijn Hendriks
>            Assignee: Martijn Hendriks
>         Attachments: JCR-1117-v2.patch, JCR-1117.patch, stacktrace.txt
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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


[jira] Updated: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Hendriks updated JCR-1117:
----------------------------------

    Attachment: JCR-1117.patch

Hi,

Here is a patch that clears the cache(s) of a caching persistence manager from the Update.cancel() method. The AbstractBundlepersistenceManager removes all given nodeIds from its bundle and missing cache.

Best regards,

Martijn

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.3
>            Reporter: Martijn Hendriks
>         Attachments: JCR-1117.patch
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. The SharedItemStateManager$Update.cancel() method uses these invalid bundle data.

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


[jira] Updated: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Hendriks updated JCR-1117:
----------------------------------

    Attachment: JCR-1117-v3.patch

Added a new patch which addresses Marcel's comment.

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3, 1.4, 1.5.0, 1.5.2
>            Reporter: Martijn Hendriks
>            Assignee: Martijn Hendriks
>         Attachments: JCR-1117-v2.patch, JCR-1117-v3.patch, JCR-1117.patch, stacktrace.txt
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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


[jira] Resolved: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Hendriks resolved JCR-1117.
-----------------------------------

    Resolution: Fixed
      Assignee:     (was: Martijn Hendriks)

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3, 1.4, 1.5.0, 1.5.2
>            Reporter: Martijn Hendriks
>         Attachments: JCR-1117-v2.patch, JCR-1117-v3.patch, JCR-1117.patch, stacktrace.txt
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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


[jira] Assigned: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Hendriks reassigned JCR-1117:
-------------------------------------

    Assignee: Martijn Hendriks

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3
>            Reporter: Martijn Hendriks
>            Assignee: Martijn Hendriks
>         Attachments: JCR-1117.patch
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. The SharedItemStateManager$Update.cancel() method uses these invalid bundle data.

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


[jira] Updated: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Hendriks updated JCR-1117:
----------------------------------

    Attachment: JCR-1117-v2.patch

The first patch clears the cache too late. Suppose that the storage of a changelog fails, and blockOnConnectionLoss is true, then storage of the ChangeLog is retried with the corrupt bundle cache until it succeeeds. If this succeeds, then possibly corrupt bundles have been flushed to the DB.

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3
>            Reporter: Martijn Hendriks
>            Assignee: Martijn Hendriks
>         Attachments: JCR-1117-v2.patch, JCR-1117.patch, stacktrace.txt
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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


[jira] Updated: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-1117:
-------------------------------

    Affects Version/s: 1.5.4
                       1.5.3
        Fix Version/s: 1.5.5

Merged to the 1.5 branch in revision 760810.

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3, 1.4, 1.5.0, 1.5.2, 1.5.3, 1.5.4
>            Reporter: Martijn Hendriks
>             Fix For: 1.5.5
>
>         Attachments: JCR-1117-v2.patch, JCR-1117-v3.patch, JCR-1117.patch, stacktrace.txt
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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


[jira] Updated: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Martijn Hendriks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Hendriks updated JCR-1117:
----------------------------------

    Attachment: stacktrace.txt

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3
>            Reporter: Martijn Hendriks
>            Assignee: Martijn Hendriks
>         Attachments: JCR-1117.patch, stacktrace.txt
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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


[jira] Commented: (JCR-1117) Bundle cache is not rolled back when the storage of a ChangeLog fails

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677355#action_12677355 ] 

Marcel Reutegger commented on JCR-1117:
---------------------------------------

+1

looks good to me.

> Bundle cache is not rolled back when the storage of a ChangeLog fails
> ---------------------------------------------------------------------
>
>                 Key: JCR-1117
>                 URL: https://issues.apache.org/jira/browse/JCR-1117
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3, 1.4, 1.5.0, 1.5.2
>            Reporter: Martijn Hendriks
>            Assignee: Martijn Hendriks
>         Attachments: JCR-1117-v2.patch, JCR-1117-v3.patch, JCR-1117.patch, stacktrace.txt
>
>
> The bundle cache in the bundle persistence managers is not restored to its old state when the AbstractBundlePersistenceManager.store(ChangeLog changeLog) method throws an exception. If, for instance, the storage of references fails then the AbstractBundlePersistenceManager.putBundle(NodePropBundle bundle) method has already been called for all modified bundles. Because of the connection rollback, the bundle cache will be out-of-sync with the persistent state. As a result, the SharedItemStateManager will have an incorrect view of the persistent state.
> Furthermore, if the blockOnConnectionLoss property is set to true, then the BundleDbPersistenceManager can be caught in an infinite loop because of invalid SQL inserts because of an incorrect bundle cache; see attached stacktrace.

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