Eliminate unreachable code related to OP_QUERY in dbclient_rs.cpp

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • QE 2022-06-27
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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:

      The work for this ticket is to confirm that this logic is indeed unreachable, and if so remove it.

            Assignee:
            David Storch
            Reporter:
            David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: