[SERVER-65161] Coverity analysis defect 122006: Redundant test Created: 01/Apr/22  Updated: 27/Oct/23  Resolved: 06/May/22

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

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

Attachments: PNG File Capture.PNG    
Issue Links:
Problem/Incident
is caused by SERVER-63899 Add a target batch execution time to ... Closed
Operating System: ALL
Sprint: Execution Team 2022-05-16
Participants:

 Description   

Redundant test

By the time the program execution reaches the test of this condition there is only one possible outcome for the test. The code at the destination of this branch is not dead, either because this condition is always true or because there is at least one other branch that reaches it. Test always evaluates the same
/src/mongo/db/exec/batched_delete_stage.cpp:269: DEADCODE 122006 At condition "ret == mongo::PlanStage::NEED_TIME", the value of "ret" must be equal to 2.
/src/mongo/db/exec/batched_delete_stage.cpp:269: DEADCODE 122006 Condition "ret != mongo::PlanStage::NEED_TIME", taking false branch. Now the value of "ret" is equal to 2.
/src/mongo/db/exec/batched_delete_stage.cpp:269: DEADCODE 122006 The condition "ret == mongo::PlanStage::NEED_TIME" must be true.



 Comments   
Comment by Haley Connelly [ 06/May/22 ]

The code has changed substantially since this was filed. Closing as gone away

Generated at Thu Feb 08 06:02:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.