Browse Source

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
pull/5543/head
Konstantin Lebedev 8 months ago
committed by GitHub
parent
commit
6f9267ebdf
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      weed/storage/volume_checking.go

3
weed/storage/volume_checking.go

@ -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) return 0, fmt.Errorf("verifyNeedleIntegrity check %s entry offset %d size %d: %v", datFile.Name(), offset, size, err)
} }
n.AppendAtNs = util.BytesToUint64(bytes) n.AppendAtNs = util.BytesToUint64(bytes)
if n.HasTtl() {
return n.AppendAtNs, nil
}
fileTailOffset := offset + needle.GetActualSize(size, v) fileTailOffset := offset + needle.GetActualSize(size, v)
fileSize, _, err := datFile.GetStat() fileSize, _, err := datFile.GetStat()
if err != nil { if err != nil {

Loading…
Cancel
Save