Find a proper place to store IncrementalRolloutFeatureFlags

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The flags are currently stored as static vector inside a private getter:

       

      namespace {
      std::vector<IncrementalRolloutFeatureFlag*>& getMutableAllIncrementalRolloutFeatureFlags() {
          static StaticImmortal<std::vector<IncrementalRolloutFeatureFlag*>> flags;
          return *flags;
      }
      }  // namespace

      All functions inside IncrementalRolloutFeatureFlag that need to access all flags (like IncrementalRolloutFeatureFlag::findByName()) do this by calling getMutableAllIncrementalRolloutFeatureFlags().

       

      As follow-up from SERVER-115426, there was this discussion:

      Shouldn't these live on the ServiceContext rather being statics like this? I don't think we need FCV before we have a ServiceContext do we?

      So: Where should IncrementalRolloutFeatureFlags be stored?

            Assignee:
            Unassigned
            Reporter:
            Niels Lohmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: