feat: drive sub-sys to max timeout reload (#18501)

This commit is contained in:
jiuker
2023-11-28 01:15:06 +08:00
committed by GitHub
parent 506f121576
commit be02333529
12 changed files with 197 additions and 57 deletions

View File

@@ -204,7 +204,7 @@ func (er erasureObjects) cleanupStaleUploadsOnDisk(ctx context.Context, disk Sto
if err != nil {
return nil
}
w := xioutil.NewDeadlineWorker(diskMaxTimeout)
w := xioutil.NewDeadlineWorker(globalDriveConfig.GetMaxTimeout())
return w.Run(func() error {
wait := deletedCleanupSleeper.Timer(ctx)
if now.Sub(fi.ModTime) > expiry {
@@ -218,7 +218,7 @@ func (er erasureObjects) cleanupStaleUploadsOnDisk(ctx context.Context, disk Sto
if err != nil {
return nil
}
w := xioutil.NewDeadlineWorker(diskMaxTimeout)
w := xioutil.NewDeadlineWorker(globalDriveConfig.GetMaxTimeout())
return w.Run(func() error {
wait := deletedCleanupSleeper.Timer(ctx)
if now.Sub(vi.Created) > expiry {
@@ -239,7 +239,7 @@ func (er erasureObjects) cleanupStaleUploadsOnDisk(ctx context.Context, disk Sto
if err != nil {
return nil
}
w := xioutil.NewDeadlineWorker(diskMaxTimeout)
w := xioutil.NewDeadlineWorker(globalDriveConfig.GetMaxTimeout())
return w.Run(func() error {
wait := deletedCleanupSleeper.Timer(ctx)
if now.Sub(vi.Created) > expiry {