How to safely drop index to make server v3.3.4 work

I am making the leap from 2.x to 3.x and I am getting the following error.

   'Index with name: email_1 already exists with different options',
  code: 85,
  codeName: 'IndexOptionsConflict',
  name: 'MongoError',
  [Symbol(mongoErrorContextSymbol)]: {} }

Within MongoDB Atlas I can find this index and have the option to drop it (see below).

however I wanted to know what the consequences of doing this are, and how the above error should be tackled ? Should a create the index again straight away with new options?

I note a similar issue here there the conversation is quite casual about deleting indexes, however in prod the makes me v.nervous!

Many thanks!

You should be fine by dropping the index through MongoDB Atlas dashboard and then restarting Parse Server so it can create it correctly. The unique possible issue I can see: while Parse Server is still creating the email index, you will have no indexes for this field and it can cause your login process to slow down depending on the size of your _User collection. So, I’d suggest you to do two things:

  • First of all, clone your database to a stating environment and test the operation there;
  • Second, do the production change in a non-peak time.
1 Like

Thanks very much, this all went to plan!

1 Like