[SERVER-74416] Make sure analyzeShardKey and configureQueryAnalyzer command use database and shard versioning Created: 27/Feb/23  Updated: 29/Oct/23  Resolved: 03/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

Issue Links:
Depends
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding NYC 2023-03-06
Participants:
Linked BF Score: 154

 Description   

Currently, the analyzeShardKey command doesn't participate in shard versioning when it is sent to a secondary since:

  1. On secondaries, the database and shard version check is only performed for commands that specify a readConcern (that is not "available").
  2. When constructing analyzeShardKey command to forward to a shard, mongos attaches the database version and shard version as necessary but it doesn't attach a readConcern since the analyzeShardKey command only supports readConcern "local" anyway.

Given (1), mongos should explicitly attach the readConcern to "local" to the analyzeShardKey command to a shard.

Similarly, the configureQueryAnalyzer command currently runs $listCollections command against the primary shard. However, it doesn't have the logic to refresh and retry on a StaleDbVersion error.



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

Author:

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

Message: SERVER-74416 Make sure analyzeShardKey and configureQueryAnalyzer command use database and shard versioning
Branch: master
https://github.com/mongodb/mongo/commit/400ac8f8cf6938ee5f9e7a754061fa318b8bc46c

Comment by Githook User [ 02/Mar/23 ]

Author:

{'name': 'Uladzimir Makouski', 'email': 'uladzimir.makouski@mongodb.com', 'username': 'umakouski'}

Message: Revert "SERVER-74416 Make sure analyzeShardKey and configureQueryAnalyzer command use database and shard versioning"

This reverts commit 5c4d7fcb0ed77081dfe435a2e3056ae40b4af68a.
Branch: master
https://github.com/mongodb/mongo/commit/cd856945e956ab34b792ee3abd247cf182f95209

Comment by Githook User [ 02/Mar/23 ]

Author:

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

Message: SERVER-74416 Make sure analyzeShardKey and configureQueryAnalyzer command use database and shard versioning
Branch: master
https://github.com/mongodb/mongo/commit/5c4d7fcb0ed77081dfe435a2e3056ae40b4af68a

Comment by Githook User [ 01/Mar/23 ]

Author:

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

Message: Revert "SERVER-74416 Make sure analyzeShardKey and configureQueryAnalyzer command use database and shard versioning"

This reverts commit 8d29060501879098863f926712babfdc77fbbd6f.
Branch: master
https://github.com/mongodb/mongo/commit/83a485fb41041760670721b6327676551a4d59c4

Comment by Githook User [ 01/Mar/23 ]

Author:

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

Message: SERVER-74416 Make sure analyzeShardKey and configureQueryAnalyzer command use database and shard versioning
Branch: master
https://github.com/mongodb/mongo/commit/8d29060501879098863f926712babfdc77fbbd6f

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