“Database Ensure Index Failed” Due to Duplicate Key in metadata_values Collection (MongoDB E11000)
Original Question or Issue:
I have the following errors since the last upgrade. Error: ---Database Ensure Index Failed. I did not have errors before the upgrade.
Environment:
- Product - FileCloud Server
- Version - Any
- Platform -Any
Steps to Reproduce:
Error or Log Message:
MongoDB\Driver\Exception\CommandException: Index build failed: 50206ece-f3cd-4c07-99bc-d78d35d361c9: Collection tonidoclouddb.metadata_values ( e88921c2-ee4f-4bb5-91f7-526608ce9a62 ) :: caused by :: E11000 duplicate key error collection: tonidoclouddb.metadata_values index: mvfullpath dup key: { fullpath: "/EXTERNAL/User Folder/Waitlist Reviews" } in C:\xampp\htdocs\thirdparty\vendor\mongodb\mongodb\src\Operation\CreateIndexes.php:198 Stack trace: #0 C:\xampp\htdocs\thirdparty\vendor\mongodb\mongodb\src\Operation\CreateIndexes.php(198): MongoDB\Driver\Server->executeWriteCommand() #1 C:\xampp\htdocs\thirdparty\vendor\mongodb\mongodb\src\Operation\CreateIndexes.php(141): MongoDB\Operation\CreateIndexes->executeCommand() #2 C:\xampp\htdocs\thirdparty\vendor\mongodb\mongodb\src\Collection.php(365): MongoDB\Operation\CreateIndexes->execute() #3
Defect or Enhancement Number:
Cause:
Upgrade process attempted to create a unique index on the fullpath field in the metadata_values collection, but a duplicate entry already exists
Resolution or Workaround:
Remove the Duplicate Key directly from the database.
Notes: