aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorTom Maxwell <tom.maxwell@4sightimaging.com>2019-09-04 15:27:14 +0100
committerTom Maxwell <tom.maxwell@4sightimaging.com>2019-09-04 15:27:14 +0100
commit4a878c0006ba97af83e8ad546839f42f1a224c7f (patch)
treeda618f7c13d5eaf9ce574f908c37d98588a63b2b /weed/command
parent6ee65356e3492b2df46b9204009a6327ff500745 (diff)
downloadseaweedfs-4a878c0006ba97af83e8ad546839f42f1a224c7f.tar.xz
seaweedfs-4a878c0006ba97af83e8ad546839f42f1a224c7f.zip
Changed the InMemory bool to a uint32 so that it can be used to alter how much space to reserve
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/backup.go4
-rw-r--r--weed/command/compact.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/weed/command/backup.go b/weed/command/backup.go
index 65d2a745b..9849f566e 100644
--- a/weed/command/backup.go
+++ b/weed/command/backup.go
@@ -112,7 +112,7 @@ func runBackup(cmd *Command, args []string) bool {
return true
}
}
- v, err := storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, false)
+ v, err := storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
if err != nil {
fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err)
return true
@@ -137,7 +137,7 @@ func runBackup(cmd *Command, args []string) bool {
// remove the old data
v.Destroy()
// recreate an empty volume
- v, err = storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, false)
+ v, err = storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
if err != nil {
fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err)
return true
diff --git a/weed/command/compact.go b/weed/command/compact.go
index f10b0b2bc..03f1a14db 100644
--- a/weed/command/compact.go
+++ b/weed/command/compact.go
@@ -38,7 +38,7 @@ func runCompact(cmd *Command, args []string) bool {
vid := needle.VolumeId(*compactVolumeId)
v, err := storage.NewVolume(*compactVolumePath, *compactVolumeCollection, vid,
- storage.NeedleMapInMemory, nil, nil, preallocate, false)
+ storage.NeedleMapInMemory, nil, nil, preallocate, 0)
if err != nil {
glog.Fatalf("Load Volume [ERROR] %s\n", err)
}