[SERVER-65802] mongos returns inconsistent error code when renameCollection target already exists Created: 19/Apr/22  Updated: 29/Jan/24  Resolved: 20/Apr/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 6.0.0-rc2, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Wenbin Zhu Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-60632 Inconsistent error on mongos when ren... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.0
Sprint: Sharding EMEA 2022-05-02
Participants:

 Description   

If a rename finds that the target namespace exists, we expect mongod and mongos to return NamespaceExists error, but with mongos, depending on if the target is a sharded collection, it sometimes returns NamespaceExists error as expected, but sometimes returns an error without a dedicated error code.



 Comments   
Comment by Githook User [ 21/Apr/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-65802 Return NamespaceExists when dropTarget=false but unsharded target collection exists
Branch: v6.0
https://github.com/mongodb/mongo/commit/da3fb1b55fd672d05f0ee3364937578be296fc08

Comment by Githook User [ 20/Apr/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-65802 Return NamespaceExists when dropTarget=false but unsharded target collection exists
Branch: master
https://github.com/mongodb/mongo/commit/42a0da5e29268a786cf9f4eb109492f7364d8090

Generated at Thu Feb 08 06:03:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.