From d5c949bfde15e0a31df9c50ce73644767e62b49d Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Wed, 18 Jul 2018 22:43:29 +0800 Subject: [PATCH] handle sync every compatible with old --- consistence/nsqlookup_coord_api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/consistence/nsqlookup_coord_api.go b/consistence/nsqlookup_coord_api.go index 650e704b..090fcafe 100644 --- a/consistence/nsqlookup_coord_api.go +++ b/consistence/nsqlookup_coord_api.go @@ -599,6 +599,10 @@ func (self *NsqLookupCoordinator) CreateTopic(topic string, meta TopicMetaInfo) return err } meta.MagicCode = oldMeta.MagicCode + // handle old topic with large sync every param + if oldMeta.SyncEvery >= MAX_SYNC_EVERY { + meta.SyncEvery = oldMeta.SyncEvery + } if oldMeta != meta { return ErrAlreadyExist }