mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 12:37:57 +08:00
volume: compaction can cause readonly volumes
address https://github.com/chrislusf/seaweedfs/issues/1233
This commit is contained in:
@@ -58,7 +58,7 @@ func readIndexEntryAtOffset(indexFile *os.File, offset int64) (bytes []byte, err
|
||||
func verifyNeedleIntegrity(datFile backend.BackendStorageFile, v needle.Version, offset int64, key NeedleId, size uint32) (lastAppendAtNs uint64, err error) {
|
||||
n := new(needle.Needle)
|
||||
if err = n.ReadData(datFile, offset, size, v); err != nil {
|
||||
return n.AppendAtNs, err
|
||||
return n.AppendAtNs, fmt.Errorf("read data [%d,%d) : %v", offset, offset+int64(size), err)
|
||||
}
|
||||
if n.Id != key {
|
||||
return n.AppendAtNs, fmt.Errorf("index key %#x does not match needle's Id %#x", key, n.Id)
|
||||
|
Reference in New Issue
Block a user