[SERVER-18864] Coverity analysis defect 72740: Redundant test Created: 08/Jun/15  Updated: 06/Dec/22  Resolved: 08/Sep/16

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Backlog - Replication Team
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Test always evaluates the same

Defect 72740 (STATIC_C)
Checker DEADCODE (subcategory redundant_test)
File: /src/mongo/db/repl/data_replicator.cpp
Function mongo::repl::OplogFetcher::_delegateCallback(const mongo::StatusWith<mongo::repl::Fetcher::BatchData> &, mongo::repl::Fetcher::NextAction *)
/src/mongo/db/repl/data_replicator.cpp, line: 231
Condition "hasDoc", taking true branch. Now the value of "hasDoc" is equal to 1.

                if (checkStartTS &&

/src/mongo/db/repl/data_replicator.cpp, line: 232
At condition "hasDoc", the value of "hasDoc" must be equal to 1.

                        (!hasDoc || (hasDoc && (*firstDoc)["ts"].timestamp() != _startTS))) {

/src/mongo/db/repl/data_replicator.cpp, line: 231
The condition "hasDoc" must be true.

                if (checkStartTS &&


Generated at Thu Feb 08 03:48:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.