aboutsummaryrefslogtreecommitdiff
path: root/weed-fs/src/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'weed-fs/src/pkg')
-rw-r--r--weed-fs/src/pkg/topology/topology.go2
-rw-r--r--weed-fs/src/pkg/topology/volume_layout.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/weed-fs/src/pkg/topology/topology.go b/weed-fs/src/pkg/topology/topology.go
index e0a2b0c34..4fd109a99 100644
--- a/weed-fs/src/pkg/topology/topology.go
+++ b/weed-fs/src/pkg/topology/topology.go
@@ -57,7 +57,7 @@ func (t *Topology) loadConfiguration(configurationFile string) error {
return e
}
-func (t *Topology) Lookup(vid storage.VolumeId) *[]*DataNode {
+func (t *Topology) Lookup(vid storage.VolumeId) []*DataNode {
for _, vl := range t.replicaType2VolumeLayout {
if vl != nil {
if list := vl.Lookup(vid); list != nil {
diff --git a/weed-fs/src/pkg/topology/volume_layout.go b/weed-fs/src/pkg/topology/volume_layout.go
index 80eff5061..314aca69f 100644
--- a/weed-fs/src/pkg/topology/volume_layout.go
+++ b/weed-fs/src/pkg/topology/volume_layout.go
@@ -42,8 +42,8 @@ func (vl *VolumeLayout) isWritable(v *storage.VolumeInfo) bool{
return uint64(v.Size) < vl.volumeSizeLimit && v.Version == storage.CurrentVersion
}
-func (vl *VolumeLayout) Lookup(vid storage.VolumeId) *[]*DataNode {
- return &vl.vid2location[vid].list
+func (vl *VolumeLayout) Lookup(vid storage.VolumeId) []*DataNode {
+ return vl.vid2location[vid].list
}
func (vl *VolumeLayout) PickForWrite(count int) (*storage.VolumeId, int, *VolumeLocationList, error) {