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

Change ServerStatusSections to be const override and not virtual

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.7
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Dev Tools 2018-12-31

      We use ServerStatusSection to populate the server status throughout the codebase, but it has come to our attention that we are doing it incorrectly. Instead of

      virtual bool includeByDefault() const
      
      and 
      
      virtual BSONObj generateSection(OperationContext* opCtx, const BSONElement& configElement) const
      

      it should be:

      bool includeByDefault() const override 
      
      and 
      
      BSONObj generateSection(OperationContext* opCtx, const BSONElement& configElement) const override
      

      So just git grep "ServerStatusSections" to find the relevant areas and change them to avoid future bugs.

            Assignee:
            adam.martin@mongodb.com ADAM Martin (Inactive)
            Reporter:
            tyler.kaye@mongodb.com Tyler Kaye
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: