diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-04-19 00:39:34 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-04-19 00:39:34 -0700 |
| commit | ac2727853f94c8fc4e301a995997f02b70047853 (patch) | |
| tree | 6f311ab03450e622f281fa6d18025d263ede7825 /weed/command/backup.go | |
| parent | e5506152c0a27d38fa334b2e338d82ee02669ab9 (diff) | |
| download | seaweedfs-ac2727853f94c8fc4e301a995997f02b70047853.tar.xz seaweedfs-ac2727853f94c8fc4e301a995997f02b70047853.zip | |
fix needle map entry size
Diffstat (limited to 'weed/command/backup.go')
| -rw-r--r-- | weed/command/backup.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/command/backup.go b/weed/command/backup.go index e2b0da7dd..0e14e03ec 100644 --- a/weed/command/backup.go +++ b/weed/command/backup.go @@ -103,7 +103,9 @@ func runBackup(cmd *Command, args []string) bool { v.DataFile().WriteAt(v.SuperBlock.Bytes(), 0) } - if uint64(v.Size()) > stats.TailOffset { + datSize, _, _ := v.FileStat() + + if datSize > stats.TailOffset { // remove the old data v.Destroy() // recreate an empty volume |
