fix: skip file size checking for volume with TTL (#5541)

fix: skip file size checking for volume with tll
https://github.com/seaweedfs/seaweedfs/issues/5508
This commit is contained in:
Konstantin Lebedev 2024-04-28 12:21:57 +05:00 committed by GitHub
parent 3d3ee04eb9
commit 6f9267ebdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,6 +109,9 @@ func verifyNeedleIntegrity(datFile backend.BackendStorageFile, v needle.Version,
return 0, fmt.Errorf("verifyNeedleIntegrity check %s entry offset %d size %d: %v", datFile.Name(), offset, size, err)
}
n.AppendAtNs = util.BytesToUint64(bytes)
if n.HasTtl() {
return n.AppendAtNs, nil
}
fileTailOffset := offset + needle.GetActualSize(size, v)
fileSize, _, err := datFile.GetStat()
if err != nil {