Skip to content

Commit

Permalink
fix: SyncSegments rpc always failed (milvus-io#38032)
Browse files Browse the repository at this point in the history
issue: milvus-io#38031
cause call `cli.SyncSegments` use ctx which already be override and
canceled, so SyncSegments rpc will always failed.

Signed-off-by: Wei Liu <[email protected]>
Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
weiliu1031 authored and congqixia committed Dec 19, 2024
1 parent c3d4469 commit 8066726
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/datacoord/session_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ func (c *SessionManagerImpl) SyncSegments(ctx context.Context, nodeID int64, req
zap.Int64("planID", req.GetPlanID()),
)

ctx, cancel := context.WithTimeout(context.Background(), Params.DataCoordCfg.CompactionRPCTimeout.GetAsDuration(time.Second))
cli, err := c.getClient(ctx, nodeID)
childCtx, cancel := context.WithTimeout(context.Background(), Params.DataCoordCfg.CompactionRPCTimeout.GetAsDuration(time.Second))
cli, err := c.getClient(childCtx, nodeID)
cancel()
if err != nil {
log.Warn("failed to get client", zap.Error(err))
Expand Down

0 comments on commit 8066726

Please sign in to comment.