[SERVER-74771] Make sure analyzeShardKey command uses database and shard versioning when running commands for calculating metrics Created: 13/Mar/23  Updated: 29/Oct/23  Resolved: 13/Mar/23

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

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding NYC 2023-03-20
Participants:

 Description   

SERVER-74416 made mongos explicitly attach a readConcern to the analyzeShardKey command that it forwards to a shard. That only makes the analyzeShardKey performs the database and shard versioning check before it starts executing. Data placement changes can occur after the command starts executing. So all the aggregate commands (**) that the analyzeShardKey command run internally must also explicitly attach a readConcern to opt into database and shard versioning.

(**) The aggregate command for calculating the cardinality and frequency metrics for a non-unique shard key can continue to use readConcern "available" due to the performance reasons related to shard filtering as detailed in the design. 



 Comments   
Comment by Githook User [ 13/Mar/23 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-74771 Make sure analyzeShardKey command uses database and shard versioning when running commands for calculating metrics
Branch: master
https://github.com/mongodb/mongo/commit/fbf9372bbf3eb705b38108964a39ab78c3439c4e

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