[SERVER-15075] Coverity analysis defect 29875: Unchecked return value Created: 28/Aug/14  Updated: 08/Sep/14  Resolved: 02/Sep/14

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

A new defect has been detected and assigned to spencer in Coverity Connect.
http://coverity.mongodb.com//sourcebrowser.htm?projectId=10001#mergedDefectId=29875
The defect was flagged by checker CHECKED_RETURN in
file /src/mongo/db/repl/repl_coordinator_impl.cpp
function mongo::repl::ReplicationCoordinatorImpl::_doneWaitingForReplication_gleMode_inlock(const mongo::OpTime &, const mongo::repl::ReplicaSetTagPattern &)
and this ticket was created by milkie



 Comments   
Comment by Githook User [ 02/Sep/14 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-15075 Check return value of ReplicaSetTagMatch::update when waiting for write concern
Branch: master
https://github.com/mongodb/mongo/commit/6bf17f12e3fde9bee14d2bb9c90001080546f867

Comment by Andy Schwerin [ 29/Aug/14 ]

spencer, maybe change update() to be a void function? When I wrote it, I thought maybe there would be an efficient way to answer the isSatisfied question on incremental updates, and maybe there is, but we're not doing it now . The alternative is to leave the return value of update, and consult it in the referenced place, to short circuit the tag matching logic, if that's possible.

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