filer: stop the expired entry sweep between pages once shutdown starts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chris LuandClaude Opus 5.5 committed 2026-11-27 18:46:49 -08:00
1 parent 84f05e2fe6
commit 3af39efaf6
1 file changed
+3
+3
View File
@@ -134,6 +134,9 @@ func (f *Filer) sweepExpiredEntriesUnder(ctx context.Context, locationPrefix str
func (f *Filer) sweepExpiredEntriesIn(ctx context.Context, dir util.FullPath, namePrefix string) (expired int64, err error) {
startFileName := ""
for {
if ctxErr := ctx.Err(); ctxErr != nil {
return expired, ctxErr
}
var subDirs []util.FullPath
var listed int64
expiredCount, lastFileName, listErr := f.doListDirectoryEntries(ctx, dir, startFileName, false, expiredEntrySweepPageSize, namePrefix, func(entry *Entry) (bool, error) {