release v1.6.14 3

v4
vinllen 5 years ago
parent 29fb1fb2ef
commit f7d91fb357
  1. 8
      src/redis-shake/main/main.go
  2. 2
      src/redis-shake/restore.go

@ -236,15 +236,11 @@ func sanitizeOptions(tp string) error {
}
if tp == conf.TypeDump || tp == conf.TypeSync {
if conf.Options.SourceRdbParallel <= 0 {
conf.Options.SourceRdbParallel = len(conf.Options.SourceAddressList)
} else if conf.Options.SourceRdbParallel > len(conf.Options.SourceAddressList) {
if conf.Options.SourceRdbParallel <= 0 || conf.Options.SourceRdbParallel > len(conf.Options.SourceAddressList) {
conf.Options.SourceRdbParallel = len(conf.Options.SourceAddressList)
}
} else if tp == conf.TypeRestore || tp == conf.TypeDecode {
if conf.Options.SourceRdbParallel <= 0 {
conf.Options.SourceRdbParallel = len(conf.Options.SourceRdbInput)
} else if conf.Options.SourceRdbParallel > len(conf.Options.SourceRdbInput) {
if conf.Options.SourceRdbParallel <= 0 || conf.Options.SourceRdbParallel > len(conf.Options.SourceRdbInput) {
conf.Options.SourceRdbParallel = len(conf.Options.SourceRdbInput)
}
}

@ -45,7 +45,7 @@ func (cmd *CmdRestore) Main() {
base.Status = "waitRestore"
total := utils.GetTotalLink()
restoreChan := make(chan restoreNode, total)
for i, rdb := range conf.Options.SourceRdbInput {
restoreChan <- restoreNode{id: i, input: rdb}
}

Loading…
Cancel
Save