mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
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:
1 parent
84f05e2fe6
commit
3af39efaf6
1 file changed
+3
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user