mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-05 17:40:24 +08:00
全局IP名单不即时通知节点更新
This commit is contained in:
@@ -185,6 +185,11 @@ func (this *IPItemDAO) CreateIPItem(tx *dbs.Tx,
|
||||
}
|
||||
itemId := types.Int64(op.Id)
|
||||
|
||||
// 全局名单不需要即时更新,防止数量过多而导致性能问题
|
||||
if listId == firewallconfigs.GlobalListId {
|
||||
return itemId, nil
|
||||
}
|
||||
|
||||
err = this.NotifyUpdate(tx, itemId)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
||||
@@ -84,6 +84,7 @@ func (this *NodeService) NodeStream(server pb.NodeService_NodeStreamServer) erro
|
||||
|
||||
defer func() {
|
||||
// 修改当前API节点的主边缘节点
|
||||
/// TODO 每个集群应该有一个primaryNodeId
|
||||
if primaryNodeId == nodeId {
|
||||
primaryNodeId = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user