add more debug log in RDB2

v4
vinllen 5 years ago
parent 23293da176
commit c5b3885063
  1. 6
      src/redis-shake/restore.go
  2. 9
      src/redis-shake/sync.go

@ -158,6 +158,9 @@ func (dr *dbRestorer) restoreRDBFile(reader *bufio.Reader, target []string, auth
dr.ignore.Incr()
} else {
dr.nentry.Incr()
log.Debugf("routine[%v] try restore key[%s] with value length[%v]", dr.id, e.Key, len(e.Value))
if conf.Options.TargetDB != -1 {
if conf.Options.TargetDB != int(lastdb) {
lastdb = uint32(conf.Options.TargetDB)
@ -174,7 +177,8 @@ func (dr *dbRestorer) restoreRDBFile(reader *bufio.Reader, target []string, auth
continue
}
log.Debugf("routine[%v] restore key[%s] with value length[%v]", dr.id, e.Key, len(e.Value))
log.Debugf("routine[%v] start restoring key[%s] with value length[%v]", dr.id, e.Key, len(e.Value))
utils.RestoreRdbEntry(c, e)
log.Debugf("routine[%v] restore key[%s] ok", dr.id, e.Key)
}

@ -414,6 +414,9 @@ func (ds *dbSyncer) syncRDBFile(reader *bufio.Reader, target []string, auth_type
ds.ignore.Incr()
} else {
ds.nentry.Incr()
log.Debugf("dbSyncer[%v] try restore key[%s] with value length[%v]", ds.id, e.Key, len(e.Value))
if conf.Options.TargetDB != -1 {
if conf.Options.TargetDB != int(lastdb) {
lastdb = uint32(conf.Options.TargetDB)
@ -438,9 +441,11 @@ func (ds *dbSyncer) syncRDBFile(reader *bufio.Reader, target []string, auth_type
continue
}
}
log.Debugf("dbSyncer[%v] restore key[%s] with value length[%v]", ds.id, e.Key, len(e.Value))
log.Debugf("dbSyncer[%v] start restoring key[%s] with value length[%v]", ds.id, e.Key, len(e.Value))
utils.RestoreRdbEntry(c, e)
log.Debugf("routine[%v] restore key[%s] ok", ds.id, e.Key)
log.Debugf("dbSyncer[%v] restore key[%s] ok", ds.id, e.Key)
}
}
}()

Loading…
Cancel
Save