Details
-
Improvement
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
QE 2022-06-27
Description
There are a few blocks of code in the implementation of DBClientReplicaSet which should only execute if the client is running OP_QUERY operations. As far as I know, there should be know circumstance in which a 6.0+ shell, mongod, or mongos would ever execute an OP_QUERY. Therefore, this code is theoretically unreachable and should be removed:
- https://github.com/mongodb/mongo/blob/c9fee3630553d871c564c8129a8dee867893a35f/src/mongo/client/dbclient_rs.cpp#L822-L882
- https://github.com/mongodb/mongo/blob/c9fee3630553d871c564c8129a8dee867893a35f/src/mongo/client/dbclient_rs.cpp#L987-L1037
The work for this ticket is to confirm that this logic is indeed unreachable, and if so remove it.