[SERVER-38381] Change ServerStatusSections to be const override and not virtual Created: 03/Dec/18  Updated: 29/Oct/23  Resolved: 19/Dec/18

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

Type: Improvement Priority: Major - P3
Reporter: Tyler Kaye Assignee: ADAM Martin (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Dev Tools 2018-12-31
Participants:

 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.



 Comments   
Comment by Githook User [ 19/Dec/18 ]

Author:

{'username': 'adamlsd', 'email': 'adam.martin@10gen.com', 'name': 'ADAM David Alan Martin'}

Message: SERVER-38381 Fix some override qualifiers

A few `override` qualifiers were written using the pre-11 "make it
`virtual`" style. This is now fixed.
Branch: master
https://github.com/mongodb/mongo/commit/23c913e77e1746ed00cae24f741e6a3203033e4f

Generated at Thu Feb 08 04:48:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.