mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: support healing older content (#10076)
This PR adds support for healing older content i.e from 2yrs, 1yr. Also handles other situations where our config was not encrypted yet. This PR also ensures that our Listing is consistent and quorum friendly, such that we don't list partial objects
This commit is contained in:
@@ -1775,6 +1775,9 @@ func (s *xlStorage) CheckParts(volume, path string, fi FileInfo) error {
|
||||
|
||||
for _, part := range fi.Parts {
|
||||
partPath := pathJoin(path, fi.DataDir, fmt.Sprintf("part.%d", part.Number))
|
||||
if fi.XLV1 {
|
||||
partPath = pathJoin(path, fmt.Sprintf("part.%d", part.Number))
|
||||
}
|
||||
filePath := pathJoin(volumeDir, partPath)
|
||||
if err = checkPathLength(filePath); err != nil {
|
||||
return err
|
||||
@@ -2380,6 +2383,9 @@ func (s *xlStorage) VerifyFile(volume, path string, fi FileInfo) (err error) {
|
||||
for _, part := range fi.Parts {
|
||||
checksumInfo := erasure.GetChecksumInfo(part.Number)
|
||||
partPath := pathJoin(volumeDir, path, fi.DataDir, fmt.Sprintf("part.%d", part.Number))
|
||||
if fi.XLV1 {
|
||||
partPath = pathJoin(volumeDir, path, fmt.Sprintf("part.%d", part.Number))
|
||||
}
|
||||
if err := s.bitrotVerify(partPath,
|
||||
erasure.ShardFileSize(part.Size),
|
||||
checksumInfo.Algorithm,
|
||||
|
||||
Reference in New Issue
Block a user