diff options
| author | Chris Lu <chris.lu@gmail.com> | 2014-03-19 04:48:13 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2014-03-19 04:48:13 -0700 |
| commit | 0563773944aa96c1bb87a2e840f00c0e34a8175f (patch) | |
| tree | 723610067336d0367e53ad01e7bd163640b32601 /go/topology/topology.go | |
| parent | 463589da016e9a56cee0300b50219947dbd2fc64 (diff) | |
| download | seaweedfs-0563773944aa96c1bb87a2e840f00c0e34a8175f.tar.xz seaweedfs-0563773944aa96c1bb87a2e840f00c0e34a8175f.zip | |
switch to ReadAt() for thread-safe read
fix bugs during volume compaction
Diffstat (limited to 'go/topology/topology.go')
| -rw-r--r-- | go/topology/topology.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/go/topology/topology.go b/go/topology/topology.go index 055d273cd..d5af60cd8 100644 --- a/go/topology/topology.go +++ b/go/topology/topology.go @@ -129,8 +129,8 @@ func (t *Topology) DeleteCollection(collectionName string) { delete(t.collectionMap, collectionName) } -func (t *Topology) RegisterVolumeLayout(v *storage.VolumeInfo, dn *DataNode) { - t.GetVolumeLayout(v.Collection, v.ReplicaPlacement).RegisterVolume(v, dn) +func (t *Topology) RegisterVolumeLayout(v storage.VolumeInfo, dn *DataNode) { + t.GetVolumeLayout(v.Collection, v.ReplicaPlacement).RegisterVolume(&v, dn) } func (t *Topology) RegisterVolumes(init bool, volumeInfos []storage.VolumeInfo, ip string, port int, publicUrl string, maxVolumeCount int, dcName string, rackName string) { @@ -144,7 +144,7 @@ func (t *Topology) RegisterVolumes(init bool, volumeInfos []storage.VolumeInfo, dn = rack.GetOrCreateDataNode(ip, port, publicUrl, maxVolumeCount) dn.UpdateVolumes(volumeInfos) for _, v := range volumeInfos { - t.RegisterVolumeLayout(&v, dn) + t.RegisterVolumeLayout(v, dn) } } |
