anchor.diff:                lists:keystore(SubKey, 1, Acc, Val)
         end, Props, SubKeys).
   
  -upgrade_config_from_3_0_to_3_0_2(Config) ->
  -    ?log_info("Upgrading config from 3.0 to 3.0.2"),
  -    DefaultConfig = default(),
  -    do_upgrade_config_from_3_0_to_3_0_2(Config, DefaultConfig).
  -
  -do_upgrade_config_from_3_0_to_3_0_2(Config, DefaultConfig) ->
  -    %% MB-12655: we 'upgrade' all per node keys of this node to include vclock.
  -    %%
  -    %% NOTE: that on brand new installations of 3.0+ we already force
  -    %% all per-node keys to have vclocks as part of work on
  -    %% MB-10254. At the time of this writing it is done as part of
  -    %% ns_config initialization
  -    PerNodeKeyTouchings = [{set, K, V}
  -                           || {{node, N, KN} = K, V} <- ns_config:get_kv_list_with_config(Config),
  -                              N =:= node(),
  -                              KN =/= config_version,
  -                              KN =/= memcached],
  -
  -    [upgrade_sub_keys(memcached, [engines], Config, DefaultConfig) | PerNodeKeyTouchings].
  -
  -upgrade_config_from_3_0_2_to_3_1_5(Config) ->
  -    ?log_info("Upgrading config from 3.0.2 to 3.1.5"),
  -    DefaultConfig = default(),
  -    do_upgrade_config_from_3_0_2_to_3_1_5(Config, DefaultConfig).
  -
  -do_upgrade_config_from_3_0_2_to_3_1_5(Config, DefaultConfig) ->
  -    [upgrade_key(memcached_defaults, DefaultConfig),
  -     upgrade_sub_keys(memcached_config, [dedupe_nmvb_maps], Config, DefaultConfig)].
  -
  -upgrade_config_from_3_1_5_to_4_0(Config) ->
  -    ?log_info("Upgrading config from 3.1.5 to 4.0"),
  -    do_upgrade_config_from_3_1_5_to_4_0(Config, default()).
  -
  -do_upgrade_config_from_3_1_5_to_4_0(Config, DefaultConfig) ->
  -    [upgrade_key(memcached_defaults, DefaultConfig),
  -     upgrade_key(port_servers, DefaultConfig),
  -     upgrade_sub_keys(memcached, [audit_file, engines, config_path, {delete, verbosity}],
  -                      Config, DefaultConfig),
  -     upgrade_key(memcached_config, DefaultConfig)].
  -
   upgrade_config_from_4_0_to_4_1_1(Config) ->
       ?log_info("Upgrading config from 4.0 to 4.1.1"),
       do_upgrade_config_from_4_0_to_4_1_1(Config, default()).
  
positive.code:     case ns_config:search_node(node(), Config, config_version) of
          {value, CurrentVersion} ->
              [];
          {value, {3,0}} ->
              [{set, {node, node(), config_version}, {3,0,2}} |
               upgrade_config_from_3_0_to_3_0_2(Config)];
          {value, {3,0,2}} ->
              [{set, {node, node(), config_version}, {3,1,5}} |
               upgrade_config_from_3_0_2_to_3_1_5(Config)];
          {value, {3,1,5}} ->
              [{set, {node, node(), config_version}, {4,0}} |
               upgrade_config_from_3_1_5_to_4_0(Config)];
          {value, {4,0}} ->
              [{set, {node, node(), config_version}, {4,1,1}} |
               upgrade_config_from_4_0_to_4_1_1(Config)];
  
negative.code:                                 continue
                          end, Config).
  
  upgrade_4_0_to_4_1_1_test() ->
      Cfg = [[{some_key, some_value},
              {{node, node(), memcached}, old_memcached_config},
  