diff --git a/src/redis-shake/common/cluster.go b/src/redis-shake/common/cluster.go index a4cbeb7..8bf9df5 100644 --- a/src/redis-shake/common/cluster.go +++ b/src/redis-shake/common/cluster.go @@ -7,6 +7,10 @@ import ( "pkg/libs/log" ) +const( + RecvChanSize = 4096 +) + /* implement redigo.Conn(https://github.com/garyburd/redigo) * Embed redis-go-cluster(https://github.com/chasex/redis-go-cluster) * The reason I create this struct is that redis-go-cluster isn't fulfill redigo.Conn @@ -24,6 +28,10 @@ type reply struct { } func NewClusterConn(clusterClient *redigoCluster.Cluster, recvChanSize int) redigo.Conn { + if recvChanSize == 0 { + recvChanSize = RecvChanSize + } + return &ClusterConn{ client: clusterClient, recvChan: make(chan reply, recvChanSize), diff --git a/src/redis-shake/restore.go b/src/redis-shake/restore.go index ef1fef9..6286a58 100644 --- a/src/redis-shake/restore.go +++ b/src/redis-shake/restore.go @@ -174,6 +174,8 @@ func (dr *dbRestorer) restoreRDBFile(reader *bufio.Reader, target []string, auth continue } utils.RestoreRdbEntry(c, e) + + log.Debugf("routine[%v] restore key[%s] with value length[%v]", dr.id, e.Key, len(e.Value)) } } }() diff --git a/src/redis-shake/sync.go b/src/redis-shake/sync.go index 1545695..a3e126f 100644 --- a/src/redis-shake/sync.go +++ b/src/redis-shake/sync.go @@ -439,6 +439,7 @@ func (ds *dbSyncer) syncRDBFile(reader *bufio.Reader, target []string, auth_type } } utils.RestoreRdbEntry(c, e) + log.Debugf("dbSyncer[%v] restore key[%s] with value length[%v]", ds.id, e.Key, len(e.Value)) } } }()