Hi, On 13.05.19, 13:27, "zhouxu" <[email protected]> wrote: > 1. We create a mongodb database called oak. In the development stage, > node data and file content data are stored in the same mongodb.
Please note, this is not recommended [0]. > 2. Simply embedding oak into our application system cms, refer to this > link:http://jackrabbit.apache.org/oak/docs/construct.html# Those are meant for embedded deployments and test and not suitable for a clustered/distributed setup. Using the deployment in an OSGi container is the preferred way. > 3. Each developer runs tomcat's CMS on their own computers for > development For development, my recommendation is to use a local MongoDB as well and not use a shared instance. Otherwise there's always a chance developers interfere when they work on the same database. > The problem we encounter is : data conflicts (CommitFailedException: > OakMerge0004) always occur during development, such as failure to save a > type of node, which can not be used by all developers. From your previous messages, it appears one process crashed and recovery must be run first to make some pending changes visible. See in DocumentNodeStoreService [1] how this is done. Regards Marcel [0] https://jackrabbit.apache.org/oak/docs/nodestore/document/mongo-document-store.html#Recommendations [1] https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.12.0/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java#L791
