aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/volume.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2025-06-19 01:15:25 -0700
committerchrislu <chris.lu@gmail.com>2025-06-19 01:15:25 -0700
commit2f1b3d68d7f3d4b8684ee37a58938f7af399117c (patch)
treed7b4a1cddb602de3ecd2341a60bf0f067a206763 /weed/storage/volume.go
parent87927d068b02d965f3ea287488942f49f1f4d151 (diff)
downloadseaweedfs-2f1b3d68d7f3d4b8684ee37a58938f7af399117c.tar.xz
seaweedfs-2f1b3d68d7f3d4b8684ee37a58938f7af399117c.zip
pass volume version when creating a volume
Diffstat (limited to 'weed/storage/volume.go')
-rw-r--r--weed/storage/volume.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/storage/volume.go b/weed/storage/volume.go
index e55564652..b495b379d 100644
--- a/weed/storage/volume.go
+++ b/weed/storage/volume.go
@@ -55,14 +55,14 @@ type Volume struct {
lastIoError error
}
-func NewVolume(dirname string, dirIdx string, collection string, id needle.VolumeId, needleMapKind NeedleMapKind, replicaPlacement *super_block.ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapMaxSizeMb uint32, ldbTimeout int64) (v *Volume, e error) {
+func NewVolume(dirname string, dirIdx string, collection string, id needle.VolumeId, needleMapKind NeedleMapKind, replicaPlacement *super_block.ReplicaPlacement, ttl *needle.TTL, preallocate int64, ver needle.Version, memoryMapMaxSizeMb uint32, ldbTimeout int64) (v *Volume, e error) {
// if replicaPlacement is nil, the superblock will be loaded from disk
v = &Volume{dir: dirname, dirIdx: dirIdx, Collection: collection, Id: id, MemoryMapMaxSizeMb: memoryMapMaxSizeMb,
asyncRequestsChan: make(chan *needle.AsyncRequest, 128)}
v.SuperBlock = super_block.SuperBlock{ReplicaPlacement: replicaPlacement, Ttl: ttl}
v.needleMapKind = needleMapKind
v.ldbTimeout = ldbTimeout
- e = v.load(true, true, needleMapKind, preallocate)
+ e = v.load(true, true, needleMapKind, preallocate, ver)
v.startWorker()
return
}