anchor.diff:  
   -module(ns_online_config_upgrader).
   
  +-include("cut.hrl").
   -include("ns_common.hrl").
   
   -export([upgrade_config/1]).
  
positive.code:         %% default config, but that uncovered issues that I'm too scared to
          %% touch at the moment.
          false ->
              [{set, cluster_compat_version, ?VERSION_30}];
          {value, undefined} ->
              [{set, cluster_compat_version, ?VERSION_30}];
          {value, ?VERSION_30} ->
              [{set, cluster_compat_version, ?VERSION_40} |
               upgrade_config_from_3_0_to_4_0(Config)];
          {value, ?VERSION_40} ->
              [{set, cluster_compat_version, ?VERSION_41} |
               upgrade_config_from_4_0_to_4_1(Config)];
          {value, ?VERSION_41} ->
              [{set, cluster_compat_version, ?VERSION_45} |
               upgrade_config_from_4_1_to_4_5(Config)];
          {value, ?VERSION_45} ->
              [{set, cluster_compat_version, ?VERSION_46}];
          {value, ?VERSION_46} ->
              [{set, cluster_compat_version, ?VERSION_50} |
               upgrade_config_from_4_6_to_5_0(Config)];
          {value, ?VERSION_50} ->
              [{set, cluster_compat_version, ?VERSION_51} |
               upgrade_config_from_5_0_to_5_1(Config)];
          {value, ?VERSION_51} ->
              [{set, cluster_compat_version, ?VULCAN_VERSION_NUM} |
               upgrade_config_from_5_1_to_vulcan(Config)]
      end.
  
  upgrade_config_from_3_0_to_4_0(Config) ->
      ?log_info("Performing online config upgrade to 4.0 version"),
      goxdcr_upgrade:config_upgrade(Config) ++
          index_settings_manager:config_upgrade_to_40().
  
  upgrade_config_from_4_0_to_4_1(Config) ->
      ?log_info("Performing online config upgrade to 4.1 version"),
      create_service_maps(Config, [n1ql, index]).
  
  upgrade_config_from_4_1_to_4_5(Config) ->
      ?log_info("Performing online config upgrade to 4.5 version"),
      RV = create_service_maps(Config, [fts]) ++
          menelaus_users:upgrade_to_4_5(Config),
      RV1 = index_settings_manager:config_upgrade_to_45(Config) ++ RV,
      add_index_ram_alert_limit(Config) ++ RV1.
  
  add_index_ram_alert_limit(Config) ->
      {value, Current} = ns_config:search(Config, alert_limits),
  
negative.code:     Maps = [{S, ns_cluster_membership:service_nodes(Config, ActiveNodes, S)} ||
                  S <- Services],
      [{set, {service_map, Service}, Map} || {Service, Map} <- Maps].
  