Skip to content

Commit

Permalink
Reduce ctx timeout duration
Browse files Browse the repository at this point in the history
  • Loading branch information
ua741 committed Aug 12, 2024
1 parent ff72590 commit 6fc24f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/pkg/controller/filedata/replicate.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (c *Controller) replicate(i int) {

func (c *Controller) tryReplicate() error {
newLockTime := enteTime.MicrosecondsAfterMinutes(60)
ctx, cancelFun := context.WithTimeout(context.Background(), 50*time.Minute)
ctx, cancelFun := context.WithTimeout(context.Background(), 20*time.Minute)
defer cancelFun()
row, err := c.Repo.GetPendingSyncDataAndExtendLock(ctx, newLockTime, false)
if err != nil {
Expand Down

0 comments on commit 6fc24f6

Please sign in to comment.