mirror of
https://github.com/minio/minio.git
synced 2025-12-08 16:53:11 -05:00
allow expiration of all versions during Listing() (#16757)
This commit is contained in:
@@ -1285,11 +1285,9 @@ func (s *xlStorage) renameLegacyMetadata(volumeDir, path string) (err error) {
|
||||
|
||||
// Renaming xl.json to xl.meta should be fully synced to disk.
|
||||
defer func() {
|
||||
if err == nil {
|
||||
if s.globalSync {
|
||||
// Sync to disk only upon success.
|
||||
globalSync()
|
||||
}
|
||||
if err == nil && s.globalSync {
|
||||
// Sync to disk only upon success.
|
||||
globalSync()
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -2140,17 +2138,22 @@ func skipAccessChecks(volume string) (ok bool) {
|
||||
// RenameData - rename source path to destination path atomically, metadata and data directory.
|
||||
func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath string, fi FileInfo, dstVolume, dstPath string) (sign uint64, err error) {
|
||||
defer func() {
|
||||
if err != nil && !contextCanceled(ctx) && !errors.Is(err, errFileNotFound) {
|
||||
ignoredErrs := []error{
|
||||
errFileNotFound,
|
||||
errVolumeNotFound,
|
||||
errFileVersionNotFound,
|
||||
errDiskNotFound,
|
||||
errUnformattedDisk,
|
||||
}
|
||||
if err != nil && !IsErr(err, ignoredErrs...) && !contextCanceled(ctx) {
|
||||
// Only log these errors if context is not yet canceled.
|
||||
logger.LogIf(ctx, fmt.Errorf("srcVolume: %s, srcPath: %s, dstVolume: %s:, dstPath: %s - error %v",
|
||||
srcVolume, srcPath,
|
||||
dstVolume, dstPath,
|
||||
err))
|
||||
}
|
||||
if err == nil {
|
||||
if s.globalSync {
|
||||
globalSync()
|
||||
}
|
||||
if err == nil && s.globalSync {
|
||||
globalSync()
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user