Skip to content

Commit d1aab27

Browse files
fuweidruiwen-zhao
authored andcommitted
fix: deflake TestCRIImagePullTimeout/HoldingContentOpenWriter
The new active request is filed and there is no bytes read yet when the progress reporter just wakes up. If the timeout / 2 is less than the minPullProgressReportInternal, it's easy to file false alert. We should remove the minPullProgressReportInternal limit. Fixes: #8024 Signed-off-by: Wei Fu <[email protected]>
1 parent b1c6f01 commit d1aab27

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

pkg/cri/server/image_pull.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,6 @@ func (c *criService) encryptedImagesPullOpts() []containerd.RemoteOpt {
576576
}
577577

578578
const (
579-
// minPullProgressReportInternal is used to prevent the reporter from
580-
// eating more CPU resources
581-
minPullProgressReportInternal = 5 * time.Second
582579
// defaultPullProgressReportInterval represents that how often the
583580
// reporter checks that pull progress.
584581
defaultPullProgressReportInterval = 10 * time.Second
@@ -626,10 +623,6 @@ func (reporter *pullProgressReporter) start(ctx context.Context) {
626623
// check progress more frequently if timeout < default internal
627624
if reporter.timeout < reportInterval {
628625
reportInterval = reporter.timeout / 2
629-
630-
if reportInterval < minPullProgressReportInternal {
631-
reportInterval = minPullProgressReportInternal
632-
}
633626
}
634627

635628
var ticker = time.NewTicker(reportInterval)

0 commit comments

Comments
 (0)