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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.3.0
    • 5.3.0
    • None
    • Minor Change
    • ALL
    • v5.2
    • 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()));
      }
      

       

       

       

       

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: