[SERVER-60632] Inconsistent error on mongos when renameCollection target already exists Created: 12/Oct/21 Updated: 29/Oct/23 Resolved: 15/Nov/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.0.3 |
| Fix Version/s: | 5.2.0, 5.0.5, 5.1.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jeremy Mikola | Assignee: | Pierlauro Sciarelli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v5.1, v5.0
|
||||||||||||
| Sprint: | Sharding EMEA 2021-11-29 | ||||||||||||
| Participants: | |||||||||||||
| Description |
When renaming a collection to a target that already exists (without specifying dropTarget) renameCollection will fail with the following:
This corresponds to a documented error code: NamespaceExists(48) (message: "target namespace exists"). On mongos, the command responds is more cryptic:
This error code originates from checkShardedRenamePreconditions. Is it intentional for these errors to be inconsistent? Note: This was tested on 5.0.x, but I presume the inconsistency goes back to older server versions. |
| Comments |
| Comment by Githook User [ 18/Nov/21 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |
| Comment by Githook User [ 18/Nov/21 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |
| Comment by Githook User [ 15/Nov/21 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |