Commit de1ded3a authored by madengji's avatar madengji Committed by 33cn

fix comments

parent 379aac7e
...@@ -148,10 +148,7 @@ func (b *blsClient) rcvLeaderSyncTx(sync *pt.LeaderSyncInfo) error { ...@@ -148,10 +148,7 @@ func (b *blsClient) rcvLeaderSyncTx(sync *pt.LeaderSyncInfo) error {
return errors.Wrapf(types.ErrNotSync, "self is leader, off=%d bigger than peer sync=%d", off, sync.Offset) return errors.Wrapf(types.ErrNotSync, "self is leader, off=%d bigger than peer sync=%d", off, sync.Offset)
} }
//更新同步过来的最新offset 高度 //更新同步过来的最新offset 高度
if off != sync.Offset { atomic.CompareAndSwapInt32(&b.leaderOffset, b.leaderOffset, sync.Offset)
atomic.StoreInt32(&b.leaderOffset, sync.Offset)
plog.Error("rcvLeaderSyncTx sync to peer", "offset", sync.Offset)
}
//两节点不同步则不喂狗,以防止非同步或作恶节点喂狗 //两节点不同步则不喂狗,以防止非同步或作恶节点喂狗
atomic.StoreUint32(&b.feedDog, 1) atomic.StoreUint32(&b.feedDog, 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment