mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 17:48:29 +08:00
fix: pipeline/delegator leak (#42582)
the manager's logging lambda should not capture the pipeline object this creates a circular reference between the manager and the pipeline object, making it impossible for both to be GC-ed. issue: https://github.com/milvus-io/milvus/issues/42581 Signed-off-by: Buqian Zheng <buqianzheng@Buqians-MacBook-Air.local> Co-authored-by: Buqian Zheng <buqianzheng@Buqians-MacBook-Air.local>
This commit is contained in:
parent
f81652ebbc
commit
b4d549d96a
@ -48,8 +48,9 @@ func (p *pipeline) Add(nodes ...Node) {
|
|||||||
func (p *pipeline) addNode(node Node) {
|
func (p *pipeline) addNode(node Node) {
|
||||||
nodeCtx := NewNodeCtx(node)
|
nodeCtx := NewNodeCtx(node)
|
||||||
if p.enableTtChecker {
|
if p.enableTtChecker {
|
||||||
manager := timerecord.GetCheckerManger("fgNode", p.nodeTtInterval, func(list []string) {
|
nodeTtInterval := p.nodeTtInterval
|
||||||
log.Warn("some node(s) haven't received input", zap.Strings("list", list), zap.Duration("duration ", p.nodeTtInterval))
|
manager := timerecord.GetCheckerManger("fgNode", nodeTtInterval, func(list []string) {
|
||||||
|
log.Warn("some node(s) haven't received input", zap.Strings("list", list), zap.Duration("duration ", nodeTtInterval))
|
||||||
})
|
})
|
||||||
name := fmt.Sprintf("nodeCtxTtChecker-%s", node.Name())
|
name := fmt.Sprintf("nodeCtxTtChecker-%s", node.Name())
|
||||||
nodeCtx.Checker = timerecord.NewChecker(name, manager)
|
nodeCtx.Checker = timerecord.NewChecker(name, manager)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user