aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/volume_checking.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-03-17 09:43:57 -0700
committerChris Lu <chris.lu@gmail.com>2020-03-17 09:43:57 -0700
commitc3cb6fa1d75916dc463c258ccdd91ba7a0dbd5da (patch)
tree5aa61dee8341501b74a85a77d061a03da0b0f33e /weed/storage/volume_checking.go
parent12df236defbc537ad12bc43e8c437f888b4eb5e6 (diff)
downloadseaweedfs-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.go2
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)