anchor.diff:      [{Host,Port}].
   
   stop_all(RunMode) ->
  -    [exit(OldPid, kill)||OldPid<-application:get_env(message_store, {codis_scan_pid_list, RunMode}, [])],
  +    [begin
  +         application:unset_env(message_store, {codis_scan_result, RunMode, OldPid}),
  +         exit(OldPid, kill)
  +     end||OldPid<-application:get_env(message_store, {codis_scan_pid_list, RunMode}, [])],
  +    application:unset_env(message_store, {codis_scan_pid_list, RunMode}),
       ok.
   
   scan_worker(RedisHost, RedisPort, RunMode, RunArgs, MaxScan) ->
  
positive.code:         {ok, finish, List} ->
              do_handle(List, RunMode, RunArgs),
              ?INFO_MSG("Scan finish with finish:s=~p", [ {RedisHost,RedisPort}]),
              ok;
          {ok, Next, List}->
              do_handle(List, RunMode, RunArgs),
              ?MODULE:do_scan(RedisHost, RedisPort, RunMode, RunArgs, Next, MaxScan-1);
          {error, Error} ->
              ?INFO_MSG("Scan finish with Error:~p,s=~p", [Error, {RedisHost,RedisPort}]),
              {error, Error}
      end;
  do_scan(RedisHost, RedisPort, _RunMode, _RunArgs, _Cursor, _MaxScan) ->
      ?INFO_MSG("Scan finish with :~p,s=~p", [max_scan, {RedisHost,RedisPort}]),
      ok.
  
  
  
negative.code:          do_scan/6,
           do_handle_key/3,
           start_from_codis/2,
           stop_all/1,
           is_running/0,
           is_good_exit/0
  ]).
  
  -define(SCAN_COUNT, 1000).
  