[SERVER-72292] Regex bug in dropDatabase in Sharded cluster Created: 20/Dec/22 Updated: 29/Oct/23 Resolved: 21/Dec/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Huan Li | Assignee: | Pol Pinol |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Sharding EMEA
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | Launch a sharded cluster with the latest master branch code. > db.runCommand({dropDatabase: 1, writeConcern: {w: 'majority' }}) MongoServerError: Regular expression is invalid: missing terminating ] for character class
|
||||||||||||
| Sprint: | Sharding EMEA 2022-12-26 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
We found in recent server build, the `dropDatabase` command failed with confusing errors
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. |