Browse Source

aggData非法数据异常处理

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

8
master/app/et_master.go

@ -12,6 +12,7 @@ import (
"math" "math"
"net" "net"
"net/rpc" "net/rpc"
"strings"
"sync" "sync"
"time" "time"
) )
@ -158,12 +159,17 @@ func (the *EtMaster) callNodeService(node *NodeRpc, data common_models.IDataTrac
defer timeCost(node.args.ID, data.Q(), time.Now()) defer timeCost(node.args.ID, data.Q(), time.Now())
var reply bool var reply bool
err := node.client.Call(serviceMethod, data, &reply) err := node.client.Call(serviceMethod, data, &reply)
result := boolToInt(reply) result := boolToInt(reply)
if err != nil { 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()) log.Printf("master调用node异常。Error:%s", err.Error())
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 result = 2
} }
}
resultCH <- result resultCH <- result
}() }()

Loading…
Cancel
Save