diff --git a/weed/storage/volume_checking.go b/weed/storage/volume_checking.go index 0f92a2e93..4d51e081f 100644 --- a/weed/storage/volume_checking.go +++ b/weed/storage/volume_checking.go @@ -118,12 +118,8 @@ func verifyNeedleIntegrity(datFile backend.BackendStorageFile, v needle.Version, return n.AppendAtNs, nil } if fileSize > fileTailOffset { - glog.Warningf("Truncate %s from %d bytes to %d bytes!", datFile.Name(), fileSize, fileTailOffset) - err = datFile.Truncate(fileTailOffset) - if err == nil { - return n.AppendAtNs, nil - } - return n.AppendAtNs, fmt.Errorf("truncate file %s: %v", datFile.Name(), err) + glog.Warningf("data file %s actual %d bytes expected %d bytes!", datFile.Name(), fileSize, fileTailOffset) + return n.AppendAtNs, fmt.Errorf("data file %s actual %d bytes expected %d bytes", datFile.Name(), fileSize, fileTailOffset) } glog.Warningf("data file %s has %d bytes, less than expected %d bytes!", datFile.Name(), fileSize, fileTailOffset) }