Repository navigation
Description
New Issue Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Issue Description
At startup, performInitialization creates internal indexes, then updateSchemaWithIndexes() copies them into _SCHEMA. DefinedSchemas then deletes every index that is absent from the local schema and absent from isProtectedIndex. keepUnknownIndexes is false by default.
username_1, email_1, case_insensitive_username, case_insensitive_email, name_1 (_Role) and reqId_1 (_Idempotency) are protected. Indexes added later are not:
_User/_email_verify_token_User/_perishable_token_User/_auth_data_<provider>_id_Idempotency/ttl
Two instances that boot at the same time (Cloud Run, several containers) both try to drop the same index. The first drop succeeds. The second receives MongoServerError: index not found with name [_email_verify_token] (Mongo code 27, IndexNotFound). In production, after 3 retries, Parse Server calls process.exit(1). Retries do not recover: getAllClasses() serves the cached schema, which still contains the index.
With a single instance, boot succeeds and the index is then destroyed. Email verification and password reset queries scan _User.
Steps to reproduce
- Run Parse Server with a schema migration (
schema.definitions) that includes_Userand does not list the internal indexes above. LeavekeepUnknownIndexesunset. - Start the server so
performInitializationcreates_email_verify_tokenandupdateSchemaWithIndexes()stores it in_SCHEMA. - Start a second instance at the same time, or restart once so the migration sees the index in the cloud schema.
- Observe the migration drop
_email_verify_token. The second concurrent drop fails with Mongo code 27.
Actual Outcome
The migration deletes internal indexes created at startup. A concurrent boot fails with MongoServerError: index not found with name [_email_verify_token] (code 27). After 3 retries the process exits in production. Email verification and password reset queries no longer use those indexes.
Expected Outcome
Internal indexes created at startup stay in place. Dropping an index that another instance already dropped is treated as success.
Environment
Server
- Parse Server version:
9.10.1-alpha.15(still present onalphaas of 27 October 2026,9.10.7) - Operating system:
Linux - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Google Cloud Run
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
MongoDB - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
MongoDB
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
n/a - SDK version:
n/a
Logs
MongoServerError: index not found with name [_email_verify_token]
Mongo error code 27 (IndexNotFound).
Activity
parse-github-assistant commentedon Oct 27, 2026
🚀 Thanks for opening this issue!
ℹ️ You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
parseplatformorg commentedon Nov 3, 2026
🎉 This change has been released in version 9.11.0-alpha.2
parseplatformorg commentedon Nov 3, 2026
🎉 This change has been released in version 9.11.0