diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-05-04 20:34:26 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-05-04 20:34:26 -0700 |
| commit | afb6a1dbb46a2a8793c8faa0450a2609f8e01af3 (patch) | |
| tree | 36d09e952233a37b91c3d09eddd735523967115b /weed/storage/volume.go | |
| parent | 9016fa19ba4507bdf9ac0addc6d79f147c00302a (diff) | |
| download | seaweedfs-afb6a1dbb46a2a8793c8faa0450a2609f8e01af3.tar.xz seaweedfs-afb6a1dbb46a2a8793c8faa0450a2609f8e01af3.zip | |
Revert "Merge pull request #1299 from song-zhang/master"
This reverts commit 9016fa19ba4507bdf9ac0addc6d79f147c00302a, reversing
changes made to 47234760f40e4d2cea87b4a83d2178b8181598f5.
Diffstat (limited to 'weed/storage/volume.go')
| -rw-r--r-- | weed/storage/volume.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/weed/storage/volume.go b/weed/storage/volume.go index df63360a1..755b98b79 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -33,7 +33,6 @@ type Volume struct { super_block.SuperBlock dataFileAccessLock sync.RWMutex - asyncRequestsChan chan *needle.AsyncRequest lastModifiedTsSeconds uint64 //unix time in seconds lastAppendAtNs uint64 //unix time in nanoseconds @@ -47,15 +46,12 @@ type Volume struct { func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *super_block.ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapMaxSizeMb uint32) (v *Volume, e error) { // if replicaPlacement is nil, the superblock will be loaded from disk - v = &Volume{dir: dirname, Collection: collection, Id: id, MemoryMapMaxSizeMb: memoryMapMaxSizeMb, - asyncRequestsChan: make(chan *needle.AsyncRequest, 128)} + v = &Volume{dir: dirname, Collection: collection, Id: id, MemoryMapMaxSizeMb: memoryMapMaxSizeMb} v.SuperBlock = super_block.SuperBlock{ReplicaPlacement: replicaPlacement, Ttl: ttl} v.needleMapKind = needleMapKind e = v.load(true, true, needleMapKind, preallocate) - v.startWorker() return } - func (v *Volume) String() string { return fmt.Sprintf("Id:%v, dir:%s, Collection:%s, dataFile:%v, nm:%v, noWrite:%v canDelete:%v", v.Id, v.dir, v.Collection, v.DataBackend, v.nm, v.noWriteOrDelete || v.noWriteCanDelete, v.noWriteCanDelete) } @@ -69,7 +65,6 @@ func VolumeFileName(dir string, collection string, id int) (fileName string) { } return } - func (v *Volume) FileName() (fileName string) { return VolumeFileName(v.dir, v.Collection, int(v.Id)) } |
