Issue 45 in weed-fs: [Compact issue] Offset overflow
New issue 45 by hieu.hcmus@gmail.com: [Compact issue] Offset overflow http://code.google.com/p/weed-fs/issues/detail?id=45 You are using uint32(Maximum 4Gb) to store needle offset(Maximum 32Gb) when compacting. Currently It is ok if the volume size is < 4gb Change variable "offset" in ScanVolumeFile function to uint64 to fix the issue.
This commit is contained in:
@@ -19,6 +19,9 @@ const (
|
||||
NeedleChecksumSize = 4
|
||||
)
|
||||
|
||||
/*
|
||||
* Needle file size is limited to 4GB for now.
|
||||
*/
|
||||
type Needle struct {
|
||||
Cookie uint32 `comment:"random number to mitigate brute force lookups"`
|
||||
Id uint64 `comment:"needle id"`
|
||||
|
||||
Reference in New Issue
Block a user