diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-03-17 09:43:57 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-03-17 09:43:57 -0700 |
| commit | c3cb6fa1d75916dc463c258ccdd91ba7a0dbd5da (patch) | |
| tree | 5aa61dee8341501b74a85a77d061a03da0b0f33e /weed/storage/volume_checking.go | |
| parent | 12df236defbc537ad12bc43e8c437f888b4eb5e6 (diff) | |
| download | seaweedfs-c3cb6fa1d75916dc463c258ccdd91ba7a0dbd5da.tar.xz seaweedfs-c3cb6fa1d75916dc463c258ccdd91ba7a0dbd5da.zip | |
volume: compaction can cause readonly volumes
address https://github.com/chrislusf/seaweedfs/issues/1233
Diffstat (limited to 'weed/storage/volume_checking.go')
| -rw-r--r-- | weed/storage/volume_checking.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/volume_checking.go b/weed/storage/volume_checking.go index a65c2a3ff..c33f0049a 100644 --- a/weed/storage/volume_checking.go +++ b/weed/storage/volume_checking.go @@ -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) |
