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

Coverity analysis defect 105256: Redundant test

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • Labels:
    • ALL
    • Storage NYC 2019-03-25

      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) {
      

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: