heal: Dangling check to evaluate object parts separately (#19797)

This commit is contained in:
Anis Eleuch
2024-06-10 16:51:27 +01:00
committed by GitHub
parent 0662c90b5c
commit 789cbc6fb2
17 changed files with 614 additions and 183 deletions

View File

@@ -215,9 +215,9 @@ func (d *naughtyDisk) RenameFile(ctx context.Context, srcVolume, srcPath, dstVol
return d.disk.RenameFile(ctx, srcVolume, srcPath, dstVolume, dstPath)
}
func (d *naughtyDisk) CheckParts(ctx context.Context, volume string, path string, fi FileInfo) (err error) {
func (d *naughtyDisk) CheckParts(ctx context.Context, volume string, path string, fi FileInfo) (*CheckPartsResp, error) {
if err := d.calcError(); err != nil {
return err
return nil, err
}
return d.disk.CheckParts(ctx, volume, path, fi)
}
@@ -289,9 +289,9 @@ func (d *naughtyDisk) ReadXL(ctx context.Context, volume string, path string, re
return d.disk.ReadXL(ctx, volume, path, readData)
}
func (d *naughtyDisk) VerifyFile(ctx context.Context, volume, path string, fi FileInfo) error {
func (d *naughtyDisk) VerifyFile(ctx context.Context, volume, path string, fi FileInfo) (*CheckPartsResp, error) {
if err := d.calcError(); err != nil {
return err
return nil, err
}
return d.disk.VerifyFile(ctx, volume, path, fi)
}