From 2e5233ee5373570091c760a7f1e63c72870f8e80 Mon Sep 17 00:00:00 2001 From: "zhuzhao.cx" Date: Wed, 6 Mar 2019 15:06:19 +0800 Subject: [PATCH] bugfix: node.id < id --- src/redis-shake/sync.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redis-shake/sync.go b/src/redis-shake/sync.go index 636b8ef..5c86495 100644 --- a/src/redis-shake/sync.go +++ b/src/redis-shake/sync.go @@ -425,8 +425,8 @@ func (cmd *CmdSync) SyncCommand(reader *bufio.Reader, target, auth_type, passwd // cmd.SyncStat.Delay.Add(time.Now().Sub(node.t).Nanoseconds()) metric.MetricVar.AddDelay(uint64(time.Now().Sub(node.t).Nanoseconds()) / 1000000) // ms node = nil - } else if node.id > id { - log.Panicf("receive id invalid: node-id[%v] > receive-id[%v]", node.id, id) + } else if node.id < id { + log.Panicf("receive id invalid: node-id[%v] < receive-id[%v]", node.id, id) } } }