[SERVER-39088] Coverity analysis defect 105256: Redundant test Created: 18/Jan/19  Updated: 27/Oct/23  Resolved: 11/Mar/19

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Louis Williams
Resolution: Gone away Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Storage NYC 2019-03-25
Participants:

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



 Comments   
Comment by Louis Williams [ 11/Mar/19 ]

Coverity reports this as "fixed" because it has gone away.

Generated at Thu Feb 08 04:50:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.