mirror of https://github.com/milvus-io/milvus.git
enhance: Don't set the timeout for SyncSegments (#34226)
issue: #32809 --------- Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>pull/34313/head
parent
87bccb1a6b
commit
a5be322ab2
|
@ -230,18 +230,16 @@ func (c *SessionManagerImpl) SyncSegments(nodeID int64, req *datapb.SyncSegments
|
|||
zap.Int64("planID", req.GetPlanID()),
|
||||
)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), Params.DataCoordCfg.CompactionRPCTimeout.GetAsDuration(time.Second))
|
||||
defer cancel()
|
||||
cli, err := c.getClient(ctx, nodeID)
|
||||
cancel()
|
||||
if err != nil {
|
||||
log.Warn("failed to get client", zap.Error(err))
|
||||
return err
|
||||
}
|
||||
|
||||
err = retry.Do(context.Background(), func() error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), Params.DataCoordCfg.CompactionRPCTimeout.GetAsDuration(time.Second))
|
||||
defer cancel()
|
||||
|
||||
resp, err := cli.SyncSegments(ctx, req)
|
||||
// doesn't set timeout
|
||||
resp, err := cli.SyncSegments(context.Background(), req)
|
||||
if err := VerifyResponse(resp, err); err != nil {
|
||||
log.Warn("failed to sync segments", zap.Error(err))
|
||||
return err
|
||||
|
|
|
@ -3234,10 +3234,10 @@ During compaction, the size of segment # of rows is able to exceed segment max #
|
|||
p.ChannelCheckpointMaxLag.Init(base.mgr)
|
||||
|
||||
p.SyncSegmentsInterval = ParamItem{
|
||||
Key: "dataCoord.sync.interval",
|
||||
Version: "2.4.3",
|
||||
Key: "dataCoord.syncSegmentsInterval",
|
||||
Version: "2.4.6",
|
||||
Doc: "The time interval for regularly syncing segments",
|
||||
DefaultValue: "600", // 10 * 60 seconds
|
||||
DefaultValue: "300", // 5 * 60 seconds
|
||||
}
|
||||
p.SyncSegmentsInterval.Init(base.mgr)
|
||||
|
||||
|
|
Loading…
Reference in New Issue