mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
skip truncation on error
fix https://github.com/seaweedfs/seaweedfs/issues/3746
This commit is contained in:
parent
ea15476b06
commit
b6d7556dda
|
@ -407,9 +407,10 @@ func (c *commandVolumeFsck) collectOneVolumeFileIds(tempFolder string, dataNodeI
|
|||
return resp.LastModified <= cutoffFrom, nil
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Fprintf(writer, "Failed to search for last vilad index on volume %d with error %v", volumeId, err)
|
||||
fmt.Fprintf(writer, "Failed to search for last valid index on volume %d with error %v", volumeId, err)
|
||||
} else {
|
||||
buf.Truncate(index * types.NeedleMapEntrySize)
|
||||
}
|
||||
buf.Truncate(index * types.NeedleMapEntrySize)
|
||||
}
|
||||
idxFilename := getVolumeFileIdFile(tempFolder, dataNodeId, volumeId)
|
||||
err = writeToFile(buf.Bytes(), idxFilename)
|
||||
|
|
Loading…
Reference in a new issue