add debug log in RDB syncing

v4
vinllen 5 years ago
parent f68b1756c7
commit bb96149325
  1. 8
      src/redis-shake/common/cluster.go
  2. 2
      src/redis-shake/restore.go
  3. 1
      src/redis-shake/sync.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),

@ -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))
}
}
}()

@ -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))
}
}
}()

Loading…
Cancel
Save