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

Make getTransitionFCVFromAndTo return const reference

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Security 2022-11-28
    • 66

      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.

            Assignee:
            varun.ravichandran@mongodb.com Varun Ravichandran
            Reporter:
            varun.ravichandran@mongodb.com Varun Ravichandran
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: