Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-63277

Fix fault and fault facet time duration equality in server_status_health.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: 5.3.0
    • Component/s: None
    • Minor Change
    • ALL
    • v5.2
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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()));
      }
      

       

       

       

       

       

            Assignee:
            rachita.dhawan@mongodb.com Rachita Dhawan
            Reporter:
            rachita.dhawan@mongodb.com Rachita Dhawan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: