aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-04-19 00:39:34 -0700
committerChris Lu <chris.lu@gmail.com>2019-04-19 00:39:34 -0700
commitac2727853f94c8fc4e301a995997f02b70047853 (patch)
tree6f311ab03450e622f281fa6d18025d263ede7825 /weed/command
parente5506152c0a27d38fa334b2e338d82ee02669ab9 (diff)
downloadseaweedfs-ac2727853f94c8fc4e301a995997f02b70047853.tar.xz
seaweedfs-ac2727853f94c8fc4e301a995997f02b70047853.zip
fix needle map entry size
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/backup.go4
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