Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-18864

Coverity analysis defect 72740: Redundant test

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Replication
    • Replication
    • Fully Compatible
    • ALL

    Description

      Test always evaluates the same

      Defect 72740 (STATIC_C)
      Checker DEADCODE (subcategory redundant_test)
      File: /src/mongo/db/repl/data_replicator.cpp
      Function mongo::repl::OplogFetcher::_delegateCallback(const mongo::StatusWith<mongo::repl::Fetcher::BatchData> &, mongo::repl::Fetcher::NextAction *)
      /src/mongo/db/repl/data_replicator.cpp, line: 231
      Condition "hasDoc", taking true branch. Now the value of "hasDoc" is equal to 1.

                      if (checkStartTS &&

      /src/mongo/db/repl/data_replicator.cpp, line: 232
      At condition "hasDoc", the value of "hasDoc" must be equal to 1.

                              (!hasDoc || (hasDoc && (*firstDoc)["ts"].timestamp() != _startTS))) {

      /src/mongo/db/repl/data_replicator.cpp, line: 231
      The condition "hasDoc" must be true.

                      if (checkStartTS &&

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: