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

Coverity analysis defect 105256: Redundant test

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Indexing
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      Test always evaluates the same

      Defect 105256 (STATIC_C)
      Checker DEADCODE (subcategory redundant_test)
      File: /src/mongo/db/index/index_access_method.cpp
      Function mongo::AbstractIndexAccessMethod::commitBulk(mongo::OperationContext *, mongo::IndexAccessMethod::BulkBuilder *, bool, std::set<mongo::RecordId, std::less<mongo::RecordId>, std::allocator<mongo::RecordId>> *, std::vector<mongo::BSONObj, std::allocator<mongo::BSONObj>> *)
      /src/mongo/db/index/index_access_method.cpp, line: 711
      At condition "dupsAllowed", the value of "dupsAllowed" must be equal to 1.

                  if (isDup && dupsAllowed && dupKeysInserted) {

      /src/mongo/db/index/index_access_method.cpp, line: 711
      Condition "dupsAllowed", taking true branch. Now the value of "dupsAllowed" is equal to 1.

                  if (isDup && dupsAllowed && dupKeysInserted) {

      /src/mongo/db/index/index_access_method.cpp, line: 676
      Condition "dupsAllowed", taking true branch. Now the value of "dupsAllowed" is equal to 1.

                      if (isDup && !dupsAllowed) {

      /src/mongo/db/index/index_access_method.cpp, line: 711
      The condition "dupsAllowed" must be true.

                  if (isDup && dupsAllowed && dupKeysInserted) {

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: