[SERVER-63277] Fix fault and fault facet time duration equality in server_status_health.js Created: 03/Feb/22  Updated: 29/Oct/23  Resolved: 07/Feb/22

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

Type: Bug Priority: Major - P3
Reporter: Rachita Dhawan Assignee: Rachita Dhawan
Resolution: Fixed Votes: 0
Labels: sharding-nyc-subteam2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2022-02-03-14-34-59-457.png    
Issue Links:
Backports
Depends
Backwards Compatibility: Minor Change
Operating System: ALL
Backport Requested:
v5.2
Participants:
Linked BF Score: 0

 Description   

server_status_health.js enables Mongos healthMonitoring with "test","ldap","dns" turned off. Then, it enables "test" facet with critical intensity and sets a failPoint to cause failure for it.

Then, it tests that the serverStatus call returns the essential parameters to show transient failure state. See attached screenshot. It also checks the duration on fault object and linked fault facet objects. They are checked for equality which can fail in certain delayed scenarios. 

 

assert.eq(kTestObserverFacet.duration, faultInformation.duration);

 

Suggestion: Remove the check or have the fault facet check duration less than equal to fault duration check. 

 

 

fault.cpp
void Fault::appendDescription(BSONObjBuilder* builder) const {   
 builder->append("id", getId().toBSON());  
 builder->append("duration", getDuration().toBSON());    
BSONObjBuilder facetsBuilder;    
for (auto& facet : _facets) {           facetsBuilder.append(FaultFacetType_serializer(facet->getType()), facet->toBSON());  
}
builder->append("facets", facetsBuilder.obj());    
builder->append("numFacets", static_cast<int>(_facets.size()));
}

 

 

 

 

 



 Comments   
Comment by Githook User [ 07/Feb/22 ]

Author:

{'name': 'Rachita Dhawan', 'email': 'rachita.dhawan@gmail.com', 'username': 'racdhawan'}

Message: SERVER-63277 Fix fault and fault facet time duration equality
Branch: master
https://github.com/mongodb/mongo/commit/8de1dd626534dd0c8c85d60c181ee90aee09a7f3

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