enhance: Don't set the timeout for SyncSegments (#34226)

issue: #32809

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
pull/34313/head
cai.zhang 2024-07-02 14:28:07 +08:00 committed by GitHub
parent 87bccb1a6b
commit a5be322ab2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 8 deletions

View File

@ -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

View File

@ -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)