Skip to content

Commit

Permalink
Revert increasing some timeouts as they do not help.
Browse files Browse the repository at this point in the history
Revert "Increase some timeouts to improve stability with high parallelism."

This reverts commit 9023ed8.

Revert "Increase some timeouts to improve stability with high parallelism."

This reverts commit 81d7726.
  • Loading branch information
vladaionescu committed Mar 30, 2021
1 parent 9023ed8 commit 5b54467
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion session/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (sm *Manager) Any(ctx context.Context, g Group, f func(context.Context, str
return errors.Errorf("no active sessions")
}

timeoutCtx, cancel := context.WithTimeout(ctx, 15*time.Second)
timeoutCtx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
c, err := sm.Get(timeoutCtx, id, false)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion source/containerimage/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (p *puller) CacheKey(ctx context.Context, g session.Group, index int) (cach
p.cacheKeyErr = err
}
}()
ctx, done, err := leaseutil.WithLease(ctx, p.LeaseManager, leases.WithExpiration(30*time.Minute), leaseutil.MakeTemporary)
ctx, done, err := leaseutil.WithLease(ctx, p.LeaseManager, leases.WithExpiration(5*time.Minute), leaseutil.MakeTemporary)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions util/imageutil/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co
}

if leaseManager != nil {
ctx2, done, err := leaseutil.WithLease(ctx, leaseManager, leases.WithExpiration(30*time.Minute), leaseutil.MakeTemporary)
ctx2, done, err := leaseutil.WithLease(ctx, leaseManager, leases.WithExpiration(5*time.Minute), leaseutil.MakeTemporary)
if err != nil {
return "", nil, errors.WithStack(err)
}
ctx = ctx2
defer func() {
// this lease is not deleted to allow other components to access manifest/config from cache. It will be deleted after 30 min deadline or on pruning inactive builder
// this lease is not deleted to allow other components to access manifest/config from cache. It will be deleted after 5 min deadline or on pruning inactive builder
AddLease(done)
}()
}
Expand Down

0 comments on commit 5b54467

Please sign in to comment.