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

Coverity analysis defect 72739: Unchecked return value

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Testing Infrastructure
    • Fully Compatible
    • ALL

    Description

      Value returned from a function is not checked for errors before being used

      Defect 72739 (STATIC_C)
      Checker CHECKED_RETURN (subcategory none)
      File: /src/mongo/db/repl/data_replicator.cpp
      Function mongo::repl::DataReplicator::_onOplogFetchFinish(const mongo::StatusWith<mongo::repl::Fetcher::BatchData> &, mongo::repl::Fetcher::NextAction *)
      /src/mongo/db/repl/data_replicator.cpp, line: 1357
      Calling "setFollowerMode" without checking return value (as is done elsewhere 7 out of 8 times).

                                  _replCoord->setFollowerMode(MemberState::RS_RECOVERING); // TODO too stale

      Attachments

        Activity

          People

            benety.goh@mongodb.com Benety Goh
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: