mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-01 01:40:44 +01:00
ensure offset in the index file is positive
This commit is contained in:
1 parent
10f9f1cc26
commit
9708df47d1
1 file changed
+1
-1
@@ -22,7 +22,7 @@ func CheckAndFixVolumeDataIntegrity(v *Volume, indexFile *os.File) (lastAppendAt
|
||||
return 0, nil
|
||||
}
|
||||
healthyIndexSize := indexSize
|
||||
for i := 1; i <= 10; i++ {
|
||||
for i := 1; i <= 10 && indexSize >= int64(i)*NeedleMapEntrySize; i++ {
|
||||
// check and fix last 10 entries
|
||||
lastAppendAtNs, err = doCheckAndFixVolumeData(v, indexFile, indexSize-int64(i)*NeedleMapEntrySize)
|
||||
if err == io.EOF {
|
||||
|
||||
Reference in new issue
Block a user