[SERVER-82791] createView fails with StaleConfig if a sharded collection already exists with the same namespace Created: 03/Nov/23  Updated: 11/Jan/24  Resolved: 27/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.0.0, 7.3.0-rc0, 7.2.0-rc1
Fix Version/s: 7.2.1, 7.3.0-rc0, 7.0.5

Type: Bug Priority: Major - P3
Reporter: Silvia Surroca Assignee: Enrico Golfieri
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-81190 Support tracking "simple" unsharded c... Closed
Duplicate
is duplicated by SERVER-83403 createView fails with StaleConfig if ... Closed
Assigned Teams:
Catalog and Routing
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.2, v7.0
Steps To Reproduce:

const st = new ShardingTest({mongos: 1, shards: 2, rs: {nodes: 1}});
 
const db = st.s.getDB(jsTestName());
 
assert.commandWorked(db.runCommand({shardCollection: "collA",key:{x:1}}));
assert.commandFailedWithCode(db.runCommand({create: "collA", viewOn: "a"}),
                             ErrorCodes.NamespaceExists);
 
st.stop();

Sprint: CAR Team 2023-12-11
Participants:

 Description   

Creating a view with the name of an already existing sharded collection throws StaleConfig when it should throw a NamespaceExists error.



 Comments   
Comment by Githook User [ 08/Jan/24 ]

Author:

{'name': 'egol', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-82791 createView fails with StaleConfig if a sharded collection already exists with the same namespace
Branch: v7.2
https://github.com/mongodb/mongo/commit/d69e945af5ff784d7a7fabad342931f27a1e4b82

Comment by Githook User [ 04/Dec/23 ]

Author:

{'name': 'egol', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-82791 createView fails with StaleConfig if a sharded collection already exists with the same namespace

GitOrigin-RevId: 43a854ee4d39b49fae60427178b2dbf91cc7e44a
Branch: v7.0
https://github.com/mongodb/mongo/commit/d233212af12033af9a2748ba6f064a00476411c4

Comment by Githook User [ 27/Nov/23 ]

Author:

{'name': 'egol', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-82791 createView fails with StaleConfig if a sharded collection already exists with the same namespace
Branch: master
https://github.com/mongodb/mongo/commit/f5ebdf436922663a66176badab7bad5ced14be3a

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