[SERVER-66744] Renaming view return wrong error on sharded cluster Created: 25/May/22 Updated: 29/Oct/23 Resolved: 26/Oct/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.0.7, 5.3.0-rc4, 6.0.0-rc7 |
| Fix Version/s: | 6.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | Enrico Golfieri |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | read-only-views, sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v6.1, v6.0, v5.0
|
||||||||||||||||
| Sprint: | Sharding EMEA 2022-10-03, Sharding EMEA 2022-10-17, Sharding EMEA 2022-10-31 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Renaming a view a is not supported and should return CommandNotSupportedOnView while this is the case on replica set and standalone it is not on sharded cluster. In fact, in sharded cluster, we return NamespaceNotFound error instead of CommandNotSupportedOnView. As part of this ticket we should also add test coverage for renaming view on sharded cluster. |
| Comments |
| Comment by Githook User [ 25/Oct/22 ] |
|
Author: {'name': 'Enrico Golfieri', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}Message: |
| Comment by Pierlauro Sciarelli [ 10/Jun/22 ] |
|
sean.zimmerman@mongodb.com also noticed a similar inconsistency, pasting his original message: I have a view named foo and a collection named bar and I am trying to rename bar to name foo. On a replica set I get error "NamespaceExists a view already exists with that name: test.foo", on a sharded cluster I get "CommandNotSupportedOnView Can't rename to target collection test.foo because it is a view." Since sharded rename exists only since v5.0, we should align the error messages to be consistent with plain replica sets. |