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

Change ServerStatusSections to be const override and not virtual

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.7
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Dev Tools 2018-12-31

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: