Skip to content

Commit

Permalink
Merge pull request #1723 from giuseppe/reduce-waiting-time
Browse files Browse the repository at this point in the history
pkg/system: reduce retry timeout for EnsureRemoveAll
  • Loading branch information
rhatdan authored Sep 29, 2023
2 parents f969739 + 89dabb2 commit 7b01ce7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/system/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func EnsureRemoveAll(dir string) error {

// track retries
exitOnErr := make(map[string]int)
maxRetry := 100
maxRetry := 1000

// Attempt a simple remove all first, this avoids the more expensive
// RecursiveUnmount call if not needed.
Expand All @@ -38,7 +38,7 @@ func EnsureRemoveAll(dir string) error {

// Attempt to unmount anything beneath this dir first
if err := mount.RecursiveUnmount(dir); err != nil {
logrus.Debugf("RecusiveUnmount on %s failed: %v", dir, err)
logrus.Debugf("RecursiveUnmount on %s failed: %v", dir, err)
}

for {
Expand Down Expand Up @@ -94,6 +94,6 @@ func EnsureRemoveAll(dir string) error {
return err
}
exitOnErr[pe.Path]++
time.Sleep(100 * time.Millisecond)
time.Sleep(10 * time.Millisecond)
}
}

0 comments on commit 7b01ce7

Please sign in to comment.