[SERVER-55412] Mirrored reads should propagate the shard version field Created: 22/Mar/21  Updated: 29/Oct/23  Resolved: 30/Jul/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.4.11, 5.0.4, 5.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Sergi Mateo Bellido Assignee: Alex Li
Resolution: Fixed Votes: 0
Labels: carry-over, save-for-alex, servicearch-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-47953 Improve performance of cached collect... Closed
Problem/Incident
causes SERVER-72532 CommandNotFound: no such command: 'sh... Closed
Related
related to SERVER-60804 Remove shard version checks from curs... Closed
related to SERVER-79471 Mirrored reads should include databas... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0, v4.4
Sprint: Service Arch 2021-06-28, Service Arch 2021-07-12, Service Arch 2021-08-09
Participants:
Linked BF Score: 143
Story Points: 4

 Description   

Mirrored reads are not propagating the shardVersion field to the command that it is send to the secondary nodes (e.g. find command ). This causes some performance issues (SERVER-47953 (follow-up of HELP-15484)) when a secondary steps up: due to the lack of the shard version, mirrored commands don't have the INCLUDE_SHARD_FILTER query phase, which is the phase that ends up refreshing the routing table.

The goal of this task is to extend the void appendMirrorableRequest(BSONObjBuilder* bob) function to also propagate the shardVersion field.

Affected versions: this issue is in 4.4 and master (the original concern was raised on 4.4).



 Comments   
Comment by Githook User [ 28/Oct/21 ]

Author:

{'name': 'Alex Li', 'email': 'alex.li@mongodb.com', 'username': 'alexli12456'}

Message: SERVER-55412 shardVersion propogated for mirrored reads

(cherry picked from commit 03364be4054d3d411c55a5b712e3d0733865eecd)
Branch: v5.0
https://github.com/mongodb/mongo/commit/044a58d2091c5cda066474b4b180514120f4bf50

Comment by Githook User [ 20/Oct/21 ]

Author:

{'name': 'Alex Li', 'email': 'alex.li@mongodb.com', 'username': 'alexli12456'}

Message: SERVER-55412 shardVersion propogated for mirrored reads

(cherry picked from commit 03364be4054d3d411c55a5b712e3d0733865eecd)
Branch: v4.4
https://github.com/mongodb/mongo/commit/a456bd18efff4c1af30902ab4b1bad8627fc3c42

Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Sergi Mateo Bellido [ 02/Aug/21 ]

alex.li: I think that now we can safely close SERVER-47953 =) Are we going to backport this feature to older branches (5.0, 4.4) ? Thanks!

Comment by Githook User [ 30/Jul/21 ]

Author:

{'name': 'Alex Li', 'email': 'alex.li@mongodb.com', 'username': 'alexli12456'}

Message: SERVER-55412 shardVersion propogated for mirrored reads
Branch: master
https://github.com/mongodb/mongo/commit/03364be4054d3d411c55a5b712e3d0733865eecd

Comment by Githook User [ 24/Jul/21 ]

Author:

{'name': 'Alex Li', 'email': 'alex.li@mongodb.com', 'username': 'alexli12456'}

Message: Revert "SERVER-55412 shardVersion propogated for mirrored reads"

This reverts commit 60a4229054cda93a50265a25d7a8a71ca2763e96.
Branch: master
https://github.com/mongodb/mongo/commit/2caadf6ecd74ee6c428e6eb269a35183e7ccd3c1

Comment by Githook User [ 23/Jul/21 ]

Author:

{'name': 'Alex Li', 'email': 'alex.li@mongodb.com'}

Message: SERVER-55412 shardVersion propogated for mirrored reads
Branch: master
https://github.com/mongodb/mongo/commit/60a4229054cda93a50265a25d7a8a71ca2763e96

Generated at Thu Feb 08 05:36:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.