diff --git a/conf/redis-shake.conf b/conf/redis-shake.conf index e950d3d..8a7f5ab 100644 --- a/conf/redis-shake.conf +++ b/conf/redis-shake.conf @@ -112,7 +112,7 @@ filter.db = # e.g., a;b;c # default is all. # used in `restore`, `sync` and `rump`. -# 支持按前缀过滤key,只让指定前缀的key通过,分号分隔 +# 支持按前缀过滤key,只让指定前缀的key通过,分号分隔。比如指定abc,将会过滤abc, abc1, abcxxx filter.key = # filter given slot, multiple slots are separated by ';'. # e.g., 1;2;3 diff --git a/src/redis-shake/main/main.go b/src/redis-shake/main/main.go index dcfb0fb..303f140 100644 --- a/src/redis-shake/main/main.go +++ b/src/redis-shake/main/main.go @@ -51,7 +51,12 @@ func main() { version := flag.Bool("version", false, "show version") flag.Parse() - if *configuration == "" || *tp == "" || *version { + if *version { + fmt.Println(utils.Version) + return + } + + if *configuration == "" || *tp == "" { if !*version { fmt.Println("Please show me the '-conf' and '-type'") } diff --git a/src/redis-shake/sync.go b/src/redis-shake/sync.go index 1da67a1..894c517 100644 --- a/src/redis-shake/sync.go +++ b/src/redis-shake/sync.go @@ -629,7 +629,7 @@ func (ds *dbSyncer) syncCommand(reader *bufio.Reader, target []string, auth_type if len(conf.Options.FilterKey) != 0 { cmdNode, ok := command.RedisCommands[scmd] if ok && len(argv) > 0 { - log.Debugf("dbSyncer[%v] filter command[%v]", ds.id, scmd) + // log.Debugf("dbSyncer[%v] filter command[%v]", ds.id, scmd) new_argv, pass = command.GetMatchKeys(cmdNode, argv, conf.Options.FilterKey) } else { pass = true