[SERVER-71496] Make getTransitionFCVFromAndTo return const reference Created: 18/Nov/22  Updated: 29/Oct/23  Resolved: 19/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Varun Ravichandran Assignee: Varun Ravichandran
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2022-11-28
Participants:
Linked BF Score: 66

 Description   

SERVER-65809 introduced the `transitionFCVFromAndTo` map to associate the various upgrade/downgrade FCV constants with the expected start and finish FCV version constants. `getTransitionFCVFromandTo` uses the map to retrieve the expected start and finish FCV versions given an upgrade/downgrade FCV constant. The method currently returns the FCV versions by value but const-qualifies them, which is causing clang-tidy to fail.

The function should return a const ref to the map entry instead.



 Comments   
Comment by Githook User [ 19/Nov/22 ]

Author:

{'name': 'Varun Ravichandran', 'email': 'varun.ravichandran@mongodb.com', 'username': 'varunravi98'}

Message: SERVER-71496: Return transitionFCVMap entries by const ref
Branch: master
https://github.com/mongodb/mongo/commit/e03526be7e182628190cbdf1d3eb21f36f27bedf

Generated at Thu Feb 08 06:19:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.