mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-14 21:54:55 +08:00
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:
@@ -98,7 +98,7 @@ func runExport(cmd *Command, args []string) bool {
|
||||
err = storage.ScanVolumeFile(*exportVolumePath, vid, func(superBlock storage.SuperBlock) error {
|
||||
version = superBlock.Version
|
||||
return nil
|
||||
}, func(n *storage.Needle, offset uint32) error {
|
||||
}, func(n *storage.Needle, offset int64) error {
|
||||
debug("key", n.Id, "offset", offset, "size", n.Size, "disk_size", n.DiskSize(), "gzip", n.IsGzipped())
|
||||
nv, ok := nm.Get(n.Id)
|
||||
if ok && nv.Size > 0 {
|
||||
|
Reference in New Issue
Block a user