Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-28406

Handle duplicates with MongoDB

    XMLWordPrintable

    Details

    • Release Notes Summary:
      Nuxeo handles possible duplicates creation in MongoDB.
    • Release Notes Description:
      Hide

      Activate this option using

        <extension target="org.nuxeo.ecm.core.storage.mongodb.MongoDBRepositoryService" point="repository">
          <repository name="default">
            <childNameUniqueConstraintEnabled>true</childNameUniqueConstraintEnabled>
          </repository>
        </extension>
      
      Show
      Activate this option using <extension target= "org.nuxeo.ecm.core.storage.mongodb.MongoDBRepositoryService" point= "repository" > <repository name= "default" > <childNameUniqueConstraintEnabled> true </childNameUniqueConstraintEnabled> </repository> </extension>
    • Backlog priority:
      900
    • Sprint:
      nxplatform 11.1.25, nxplatform 11.1.26
    • Story Points:
      5

      Description

      Concurrent threads can currently create documents with the same parentId and the same name => both documents will appear in the UI but it will be possible to navigate to only one using the path.

      There should be a check in Nuxeo code to avoid these duplicates, in MongoDBRepository.createState where a comment indicates that dupes should be handled.

      db.collection.createIndex( { "ecm:name": 1, "ecm:parentId": 1 }, { unique: true } )

      Note that this doesn't work with sharding so this should be optional.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 4 hours
                  2d 4h