Skip to content

Commit

Permalink
fix: SyncSegments rpc always failed (#38032)
Browse files Browse the repository at this point in the history
issue: #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]>
  • Loading branch information
weiliu1031 authored Nov 28, 2024
1 parent 7805f7d commit 88b731d
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 88b731d

Please sign in to comment.