1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-08 18:16:50 +02:00

Fix for issue #635

Fix for the following issue on master: https://github.com/chrislusf/seaweedfs/issues/635
This commit is contained in:
mtolman 2018-04-17 13:26:48 -06:00 committed by GitHub
parent d49e91cd78
commit e4b1e5c3c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,7 @@ func (v *Volume) Size() int64 {
return stat.Size()
}
glog.V(0).Infof("Failed to read file size %s %v", v.dataFile.Name(), e)
return -1
return 0 // -1 causes integer overflow and the volume to become unwritable.
}
// Close cleanly shuts down this volume