Browse Source

aggData非法数据异常处理

dev
yfh 3 weeks ago
parent
commit
03d2cce08d
  1. 10
      master/app/et_master.go

10
master/app/et_master.go

@ -12,6 +12,7 @@ import (
"math"
"net"
"net/rpc"
"strings"
"sync"
"time"
)
@ -158,11 +159,16 @@ func (the *EtMaster) callNodeService(node *NodeRpc, data common_models.IDataTrac
defer timeCost(node.args.ID, data.Q(), time.Now())
var reply bool
err := node.client.Call(serviceMethod, data, &reply)
result := boolToInt(reply)
if err != nil {
// rpc 调用node, err:read tcp 10.8.30.104:57230->10.8.30.104:40000: wsarecv: An existing connection was forcibly closed by the remote host.
isAggParseErr := strings.Contains(err.Error(), "aggData非法数据")
log.Printf("master调用node异常。Error:%s", err.Error())
result = 2
if !isAggParseErr {
// rpc 调用node, err:read tcp 10.8.30.104:57230->10.8.30.104:40000: wsarecv: An existing connection was forcibly closed by the remote host.
result = 2
}
}
resultCH <- result
}()

Loading…
Cancel
Save