Skip to content

Commit

Permalink
fix: err cannot be captured in defer in data_sync_service (milvus-io#…
Browse files Browse the repository at this point in the history
…35448)

milvus-io#35447

Signed-off-by: fengjun2016 <[email protected]>
  • Loading branch information
fengjun2016 authored Aug 14, 2024
1 parent c42976e commit 36d5986
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions internal/flushcommon/pipeline/data_sync_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,15 @@ func getServiceWithChannel(initCtx context.Context, params *util.PipelineParams,

// init flowgraph
fg := flowgraph.NewTimeTickedFlowGraph(params.Ctx)
dmStreamNode, err := newDmInputNode(initCtx, params.DispClient, info.GetVchan().GetSeekPosition(), config, input)

var dmStreamNode *flowgraph.InputNode
dmStreamNode, err = newDmInputNode(initCtx, params.DispClient, info.GetVchan().GetSeekPosition(), config, input)
if err != nil {
return nil, err
}

ddNode, err := newDDNode(
var ddNode *ddNode
ddNode, err = newDDNode(
params.Ctx,
collectionID,
channelName,
Expand All @@ -267,7 +270,8 @@ func getServiceWithChannel(initCtx context.Context, params *util.PipelineParams,
}

writeNode := newWriteNode(params.Ctx, params.WriteBufferManager, ds.timetickSender, config)
ttNode, err := newTTNode(config, params.WriteBufferManager, params.CheckpointUpdater)
var ttNode *ttNode
ttNode, err = newTTNode(config, params.WriteBufferManager, params.CheckpointUpdater)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 36d5986

Please sign in to comment.