[SERVER-74417] Make analyzeShardKey command respect client readPreference in all steps of metrics calculation 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: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Sharding NYC 2023-03-06 | ||||
| Participants: | |||||
| Linked BF Score: | 154 | ||||
| Description |
|
Currently, mongos internally sets the readPreference to "secondaryPreferred" when forward the command to a shard. That is the readPreference that is used for all steps of metrics calculation (i.e. for the internal aggregate commands). Users may want to specify running the analyzeShardKey command on nodes with a certain tag (e.g analytics nodes), therefore mongos should not ignore the readPreference specified by the client. However, if the readPreference is not specified, it should continue to use readPreference "secondaryPreferred" instead of the parser default which is "primary". |
| Comments |
| Comment by Githook User [ 03/Mar/23 ] |
|
Author: {'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}Message: |
| Comment by Githook User [ 02/Mar/23 ] |
|
Author: {'name': 'Uladzimir Makouski', 'email': 'uladzimir.makouski@mongodb.com', 'username': 'umakouski'}Message: Revert " This reverts commit e3632627ff845c0516974f5c45163284cc1962d1. |
| Comment by Githook User [ 02/Mar/23 ] |
|
Author: {'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}Message: |