Hi @gyutaelee, thanks for the detailed request. We will add a unique compound index for your FOLLOW Custom Entity.
About Your Questions:
-
Will this unique index auto-deploy to Staging/Production?
No. Because brainCloud's API blocksuniqueindexes at the code level (to prevent sharding issues), the deployer does not know about manually added indexes. -
Does this need to be applied per app/environment manually?
Yes. Each brainCloud app (Dev/Staging/Prod) is a separateappIdwith its own physical MongoDB collection. -
Can we provide appIds for Dev/Staging/Prod so you can add the index to each?
Yes, absolutely. Please reply with the App IDs for your Staging and Production environments. Once we have them, we'll apply the same unique index to all three environments. -
Are manually added Custom Entity indexes included in deploy/migrate/export-import workflows?
No. The deploy pipeline is config-driven. Any index added directly via MongoDB (outside the Portal/API) is invisible to ImportExportService. -
If there are existing duplicate rows, will unique index creation fail?
Yes. MongoDB returns duplicate key error and aborts the entire index build. Since you mentioned the feature isn't in production yet, you can safely reset/clean up FOLLOW data before we apply the index to avoid this. We may need to check for duplicates first. -
Is there expected downtime, lock, write failure, or performance impact?
No hard downtime Index builds are non-blocking: reads and writes continue during the build. -
How to verify the unique index exists after application?
You can verify it from the Indexes tab ofapp/design/cloud-data/custom-entities/FOLLOWfrom portal, or call the methodsysListIndexes()via API Explorer.
