[SERVER-78434] never implicitly shard a view in implicitly_shard_accessed_collections.js Created: 26/Jun/23  Updated: 29/Oct/23  Resolved: 05/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.1.0-rc0, 5.0.19, 7.0.0-rc6, 6.0.8
Fix Version/s: 7.1.0-rc0, 7.0.0-rc7, 5.0.20, 6.0.9

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

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0, v6.0, v5.0
Sprint: Sharding EMEA 2023-07-10
Participants:

 Description   

Currently implicitly_shard_accessed_collections.js overrides getCollection for passthrough suites implicitly runs shardCollection in case the collection is not sharded or does not exist. However, in case the namespace is a view, the command will fail with CommandNotSupportedOnView since sharding a view is not allowed. 

We should simply return the collection in case is a view.



 Comments   
Comment by Githook User [ 07/Jul/23 ]

Author:

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

Message: SERVER-78434 Never try to shard views in implicit shardCollection passthrough

(cherry picked from commit e8821d0bb878240d3b3a1cc495cc58df36458cc3)
Branch: v5.0
https://github.com/mongodb/mongo/commit/d0ef46ef17ae9ddb74be3e55fd9f3b2f6894fd1a

Comment by Githook User [ 07/Jul/23 ]

Author:

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

Message: SERVER-78434 Never try to shard views in implicit shardCollection passthrough

(cherry-picked from commit e8821d0bb878240d3b3a1cc495cc58df36458cc3)
Branch: v7.0
https://github.com/mongodb/mongo/commit/f08e7e70a0784c9fd6e02eee97aece61bdf7f998

Comment by Githook User [ 07/Jul/23 ]

Author:

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

Message: SERVER-78434 Never try to shard views in implicit shardCollection passthrough
(cherry-picked from e8821d0bb878240d3b3a1cc495cc58df36458cc3)
Branch: v6.0
https://github.com/mongodb/mongo/commit/e9057a01a54850b5bcbadc11e12b89fc92c234aa

Comment by Githook User [ 04/Jul/23 ]

Author:

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

Message: SERVER-78434 Never try to shard views in implicit shardCollection passthrough
Branch: master
https://github.com/mongodb/mongo/commit/e8821d0bb878240d3b3a1cc495cc58df36458cc3

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