You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (this*ZookeeperCoordinator) tryRemoveOldApiRequests(groupstring, apiConsumerGroupApi) error {
requests:=make([]string, 0)
varerrerrorapiPath:=fmt.Sprintf("%s/%s", newZKGroupDirs(this.config.Root, group).ConsumerApiDir, api)
fori:=0; i<=this.config.MaxRequestRetries; i++ {
requests, _, err=this.zkConn.Children(apiPath)
iferr!=nil {
continue
}
for_, request:=rangerequests {
vardata []bytevartint64childPath:=fmt.Sprintf("%s/%s", apiPath, request)
ifapi==Rebalance {
ifdata, _, err=this.zkConn.Get(childPath); err!=nil&&err==zk.ErrNoNode {
// It's possible another consumer deleted the node before we could read it's datacontinue
}
ift, err=strconv.ParseInt(string(data), 10, 64); err!=nil {
t=int64(0) // If the data isn't a timestamp ensure it will be deleted anyway.
}
} elseifapi==BlueGreenDeploymentAPI {
ift, err=strconv.ParseInt(string(request), 10, 64); err!=nil {
break
}
}
// Delete if this zk node has an expired timestampiftime.Unix(t, 0).Before(time.Now().Add(-10*time.Minute)) {
// If the data is not a timestamp or is a timestamp but has reached expiration delete iterr=this.deleteNode(childPath)
iferr!=nil&&err!=zk.ErrNoNode {
break
}
}
}
}
returnerr
}
The text was updated successfully, but these errors were encountered:
trueeyu
changed the title
why not break when handle all request?(tryRemoveOldApiRequests)
BUG?: why not break when handle all request?(tryRemoveOldApiRequests)
Nov 27, 2015
trueeyu
changed the title
BUG?: why not break when handle all request?(tryRemoveOldApiRequests)
BUG?: why not break after handle all request?(tryRemoveOldApiRequests)
Nov 27, 2015
Hey @trueeyu sorry for taking so long to get back to you, I'm quite loaded on other projects right now, I'll try to find some time to dig into this issue later today or tomorrow. Thanks
why not break after handle all request?
is it usefull to retry ?
The text was updated successfully, but these errors were encountered: