anchor.diff:      start(Host, Port, redis, SleepTime).
   
   start(Host, Port, CodisOrRedis, SleepTime) ->
  -    scan(Host, Port, CodisOrRedis, ?RUN_MODE, [SleepTime], 1000000000).
  +    scan(Host, Port, CodisOrRedis, ?RUN_MODE, [SleepTime, all], 1000000000).
  +
  +start_repair(Host, Port, CodisOrRedis, SleepTime, MaxScan) ->
  +    scan(Host, Port, CodisOrRedis, ?RUN_MODE, [SleepTime, repair], MaxScan).
   
   stop() ->
       stop_all(?RUN_MODE).
  
positive.code:     ok.
  
  
  do_handle(List, ?RUN_MODE, [SleepTime]) ->
      update_progress(length(List)),
      ?INFO_MSG("do_handle keys=~p",[List]),
      try
  
negative.code: -define(RUN_MODE, privacy_redis_to_pika).
  -define(PRIVACY_REDIS_KEY, "im:privacyv2:").
  -define(PRIVACY_PIKA_KEY, "im:privacy:pika:").
  -define(DEFAULT_PRIVACY, <<"special">>).
  -record(privacy, {us = {<<"">>, <<"">>} :: {binary(), binary()},
                    default = none        :: none | binary(),
                    lists = []}).
  
  -record(listitem, {type = none :: none | jid | group | subscription,
                     value = none ,
                     action = allow :: allow | deny,
                     order = 0 :: integer(),
                     match_all = false :: boolean(),
                     match_iq = false :: boolean(),
                     match_message = false :: boolean(),
                     match_presence_in = false :: boolean(),
                     match_presence_out = false :: boolean()}).
  -record(privacy_cache_item, {
            none = none :: none,
            jid = <<"">> ,
            group = <<"">> :: binary(),
            subscription = none :: none | both | from | to | remove,
            action = allow :: allow | deny,
            order = 0 :: integer(),
            match_strategy =  <<"">> :: binary()}).
  -record(jid, {user = <<"">> :: binary(),
                server = <<"">> :: binary(),
                resource = <<"">> :: binary(),
                luser = <<"">> :: binary(),
                lserver = <<"">> :: binary(),
                lresource = <<"">> :: binary()}).
  
  %%%===================================================================
  %%% API
  