We found in recent server build, the `dropDatabase` command failed with confusing errors
Enterprise [direct: mongos] db[]> db.runCommand({dropDatabase: 1, writeConcern: {w: 'majority' }}) MongoServerError: Regular expression is invalid: missing terminating ] for character class
After a discussion with arun.banala@mongodb.com , we found the problem was introduced in this commit https://github.com/mongodb/mongo/commit/fd2dd311397aa3671e69ae4e4d98056e8006620f
In the commit, it seems the special characters inside the database name weren't escaped when constructing a regex to match the other databases.
Please prioritize the fix for this issue otherwise we will not be able to drop the database with special characters in a sharding cluster. Thx.
- is caused by
-
SERVER-55398 Dropping a database should also drop all its associated tags
- Closed