Closed robsaccone closed 7 months ago
Yeah this is a known issue for me. I might be able to remove the sparse field as I’m not sure it’s needed. Still need to investigate the effects of removing it.
I’ve heard DocumentDB is a good enterprise level, cloud alternative (AWS)
Thanks Danny. Thinking of dropping Cosmos and either containerizing Mongo as prescribed or using Atlas. Most of my clients are big Azure shops, hence my first attempt at an Azure-first approach. Painful so far but it's working. About to deploy the assistants branch to Azure...
What happened?
Using Azure Cosmos DB as backend, which (poorly) emulates Mongo DB, and as a result have encountered a number of issues. This one is due to unique indexes being created in the users collection for each of the "social login" options (facebookId, etc.).
Apparently Cosmos DB doesn't support sparse unique indexes, i.e. treats multiple NULL values as duplicates. I am using OpenID only, so manually deleting the other indexes in the collection solved the issue.
Not looking for a fix here per se, as I'm beginning to realize that Cosmos DB should be consider a semi-supported choice given it's API emulation. Adding detail for others who might try the same, and perhaps for those who might have ideas to better support both Cosmos and Mongo.
Steps to Reproduce
What browsers are you seeing the problem on?
No response
Relevant log output
Screenshots
Code of Conduct