[SERVER-63212] Coverity analysis defect 121399: Unchecked return value Created: 02/Feb/22  Updated: 27/Oct/23  Resolved: 04/Feb/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: Tommaso Tocci
Resolution: Works as Designed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-02-02 at 11.13.48 AM.png    
Issue Links:
Problem/Incident
Related
related to SERVER-62901 Fix defragmentation stuck after phase... Closed
Operating System: ALL
Sprint: Sharding EMEA 2022-02-07
Participants:

 Description   

Unchecked return value

If the function returns an error value, the error value may be mistaken for a normal value. Value returned from a function is not checked for errors before being used
/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp:1447: CHECKED_RETURN 121399 Calling "_refreshDefragmentationPhaseFor" without checking return value (as is done elsewhere 1 out of 2 times).



 Comments   
Comment by Kyle Suarez [ 02/Feb/22 ]

Looks like this was introduced by SERVER-62901. Sending to Sharding EMEA to audit if the unchecked return value is intentional.

Generated at Thu Feb 08 05:57:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.