diff --git a/src/redis-shake/common/configure.go b/src/redis-shake/common/configure.go index ded51eac..8b38f274 100644 --- a/src/redis-shake/common/configure.go +++ b/src/redis-shake/common/configure.go @@ -141,8 +141,8 @@ func parseAddress(tp, address, redisType string, isSource bool) error { setAddressList(isSource, address) } case conf.RedisTypeProxy: - if addressLen != 1 { - return fmt.Errorf("address[%v] length[%v] must == 1 when type is 'proxy'", addressLen, addressLen) + if isSource && addressLen != 1 { + return fmt.Errorf("address[%v] length[%v] must == 1 when type is 'proxy'", address, addressLen) } if isSource && tp != conf.TypeRump { return fmt.Errorf("source.type == proxy should only happens when mode is 'rump'") diff --git a/src/redis-shake/rump.go b/src/redis-shake/rump.go index f7ace6be..cbc9e5f6 100644 --- a/src/redis-shake/rump.go +++ b/src/redis-shake/rump.go @@ -83,6 +83,12 @@ func (cr *CmdRump) Main() { cr.receiver() } +/*------------------------------------------------------*/ +// one rump link corresponding to one dbRumper +type dbRumper struct { + +} + func (cr *CmdRump) fetcher(idx int) { length, err := cr.scanners[idx].NodeCount() if err != nil || length <= 0 { @@ -94,7 +100,7 @@ func (cr *CmdRump) fetcher(idx int) { // iterate all source nodes for i := 0; i < length; i++ { // fetch db number from 'info Keyspace' - dbNumber, err := cr.getSourceDbList(i) + dbNumber, err := cr.getSourceDbList(idx) if err != nil { log.Panic(err) }