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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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