[SERVER-79693] Improve MongoProcessInterface methods used by $out to no longer always route to the primary shard Created: 03/Aug/23  Updated: 06/Nov/23  Resolved: 06/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: Ivan Fefer
Resolution: Fixed Votes: 0
Labels: pm3229-m1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-82811 ShardsvrProcessInterface::dropCollect... Closed
Related
is related to SERVER-79661 Make "internalRenameIfOptionsAndIndex... Closed
Assigned Teams:
Query Execution
Backwards Compatibility: Fully Compatible
Sprint: QE 2023-09-04, QE 2023-09-18, QE 2023-10-02, QE 2023-10-16
Participants:
Linked BF Score: 135

 Description   

Still need to figure out if anything needs to change for createTimeseriesView(), createIndexesOnEmptyCollection(), and dropCollection().



 Comments   
Comment by Githook User [ 05/Oct/23 ]

Author:

{'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}

Message: SERVER-79693 Use CollectionRouter and sharding-aware commands in ShardServerProcessInterface
Branch: master
https://github.com/mongodb/mongo/commit/2f4ed5c552d5e67a3f13401f368f1d2170589828

Comment by Jordi Serra Torrens [ 07/Aug/23 ]
  • ShardServerProcessInterface::createIndexesOnEmptyCollection currently[ only targets the dbPrimary shard with {dbVersion: X + shardVersion: UNSHARDED}|https://github.com/mongodb/mongo/blob/1aa6cc2c2ef07dfd1daefb0c4aea8be382291788/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp#L367-L368]. Needs to be changed to look like clusterCreateIndexes.
  • ShardServerProcessInterface::dropCollection currently just issues the {drop}

    command to the dbPrimary. Instead, it should issue the _shardsvrDropCollection command to the dbPrimary (like cluster_drop_collection does).

  • For ShardServerProcessInterface::createTimeseriesView, {_handleTimeseriesCreateError} needs to be changed. Currently it assumes that is running on the dbPrimary shard and looks directly into the local catalog. Instead, it should get the collection options by routing the {listCollections} command to the dbPrimary shard (like cluster_list_collections).
Generated at Thu Feb 08 06:41:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.