[SERVER-83882] I can't drop a view with two consecutives dots in the name Created: 05/Dec/23 Updated: 01/Jan/24 |
|
| Status: | Investigating |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 6.0.12 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Vincent Perez | Assignee: | Backlog - Triage Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Triage
|
| Operating System: | ALL |
| Steps To Reproduce: | You can easily create a view or a collection with a double dot in the name, then it's impossible to delete it. |
| Participants: |
| Description |
|
I've accidentally named a view : "test...view". When I try to delete it now I get the following error : MongoInvalidArgumentError: Collection names cannot be empty I tried running the following command : db.getCollection("test..view").drop() I also tried to rename it but got the same error. But the error is still there. |
| Comments |
| Comment by Eric Sedor [ 13/Dec/23 ] | |||||||||||||||||||||
|
Interesting vincentperez91@gmail.com. Can you provide version details about the module you're referring to? I may be able to transfer this ticket to a different project | |||||||||||||||||||||
| Comment by Vincent Perez [ 13/Dec/23 ] | |||||||||||||||||||||
|
I'm really sorry I finally succeeded to remove the collection. The issue is coming from the mongo node module. There is a line of code that looks for '..' string in the collection name and return the error of an empty collection name. I thought that it was coming from the database itself but it's not the case. | |||||||||||||||||||||
| Comment by Eric Sedor [ 13/Dec/23 ] | |||||||||||||||||||||
|
vincentperez91@gmail.com I am not readily able to reproduce this via the following:
Can you please take a look and see if you can provide more details that will help? Sincerely, Eric |