fix: force-delete should just rename to .trash (#12499)

avoid blocking call for force-delete, instead
treat it lazily and delete in background.
This commit is contained in:
Harshavardhana
2021-06-14 08:04:37 -07:00
committed by GitHub
parent 264ee97219
commit 31971906ff

View File

@@ -756,7 +756,7 @@ func (s *xlStorage) DeleteVol(ctx context.Context, volume string, forceDelete bo
} }
if forceDelete { if forceDelete {
err = RemoveAll(volumeDir) err = renameAll(volumeDir, pathutil.Join(s.diskPath, minioMetaTmpDeletedBucket, mustGetUUID()))
} else { } else {
err = Remove(volumeDir) err = Remove(volumeDir)
} }