Skip to content

Commit

Permalink
fix: Use correct release func when datanode unwatch a channel (milvus…
Browse files Browse the repository at this point in the history
…-io#35655)

See also milvus-io#35654

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Aug 23, 2024
1 parent e8e3544 commit 59387f0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/datanode/channel/channel_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@ func NewChannelManager(pipelineParams *util.PipelineParams, fgManager pipeline.F
opRunners: typeutil.NewConcurrentMap[string, *opRunner](),
abnormals: typeutil.NewConcurrentMap[int64, string](),

releaseFunc: fgManager.RemoveFlowgraph,
releaseFunc: func(channelName string) {
if pipelineParams.CompactionExecutor != nil {
pipelineParams.CompactionExecutor.DiscardPlan(channelName)
}
if pipelineParams.WriteBufferManager != nil {
pipelineParams.WriteBufferManager.RemoveChannel(channelName)
}
fgManager.RemoveFlowgraph(channelName)
},

closeCh: lifetime.NewSafeChan(),
}
Expand Down

0 comments on commit 59387f0

Please sign in to comment.