fix: SyncSegments rpc always failed (#38578)

miss the patch due to code branching
previous pr: #38032

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
Co-authored-by: Wei Liu <wei.liu@zilliz.com>
pull/38590/head
congqixia 2024-12-19 15:40:45 +08:00 committed by GitHub
parent b537a72309
commit 3d360c0624
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -229,8 +229,8 @@ func (c *DataNodeManagerImpl) SyncSegments(ctx context.Context, nodeID int64, re
zap.Int64("nodeID", nodeID), zap.Int64("nodeID", nodeID),
zap.Int64("planID", req.GetPlanID()), zap.Int64("planID", req.GetPlanID()),
) )
ctx, cancel := context.WithTimeout(context.Background(), paramtable.Get().DataCoordCfg.CompactionRPCTimeout.GetAsDuration(time.Second)) childCtx, cancel := context.WithTimeout(context.Background(), paramtable.Get().DataCoordCfg.CompactionRPCTimeout.GetAsDuration(time.Second))
cli, err := c.getClient(ctx, nodeID) cli, err := c.getClient(childCtx, nodeID)
cancel() cancel()
if err != nil { if err != nil {
log.Warn("failed to get client", zap.Error(err)) log.Warn("failed to get client", zap.Error(err))