4 Replies Latest reply on Jan 14, 2014 9:43 AM by Randall Hauch

    Changing nodetypes can make database inconsistent

    Lars Weissenborn Newbie

      After experimenting a bit with modeshape we found that it is very easy to make the modeshape database unstable to the point where you cannot startup modeshape at all. I was wondering if anyone else experienced these problems, and how you protect yourself against these corrupt database content problems. Can you recover if the database gets 'broken'?

       

      In a nutshell, these are a few of situations that caused problems:

      - Create a new namespace with an existing URI. Old namespace gets replaced but with a different prefix. After restarting, modeshape will not startup.

      - Deleting a namespace does not check if it is still in use. After restart, nodetypes get loaded but namespace is not found and modeshape will not startup.

      - Deleting a nodetype does not check if the type is still in use. This will survive a restart, but obviously data is not correct anymore (still pointing to a non existing nodetype)

      - Deleting a protected property is allowed. You can simply delete jcr:primaryType, which of course should not be allowed