diff options
Diffstat (limited to 'go/topology')
| -rw-r--r-- | go/topology/configuration_test.go | 2 | ||||
| -rw-r--r-- | go/topology/topology.go | 2 | ||||
| -rw-r--r-- | go/topology/volume_growth.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/go/topology/configuration_test.go b/go/topology/configuration_test.go index 35d82c058..0a353d16e 100644 --- a/go/topology/configuration_test.go +++ b/go/topology/configuration_test.go @@ -33,7 +33,7 @@ func TestLoadConfiguration(t *testing.T) { fmt.Printf("%s\n", c) if err != nil { - t.Fatalf("unmarshal error:%s", err.Error()) + t.Fatalf("unmarshal error:%v", err) } if len(c.Topo.DataCenters) <= 0 || c.Topo.DataCenters[0].Name != "dc1" { diff --git a/go/topology/topology.go b/go/topology/topology.go index c2073ed2f..4cfd070db 100644 --- a/go/topology/topology.go +++ b/go/topology/topology.go @@ -119,7 +119,7 @@ func (t *Topology) HasWritableVolume(option *VolumeGrowOption) bool { func (t *Topology) PickForWrite(count int, option *VolumeGrowOption) (string, int, *DataNode, error) { vid, count, datanodes, err := t.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl).PickForWrite(count, option) if err != nil || datanodes.Length() == 0 { - return "", 0, nil, errors.New("No writable volumes avalable!") + return "", 0, nil, errors.New("No writable volumes available!") } fileId, count := t.Sequence.NextFileId(count) return storage.NewFileId(*vid, fileId, rand.Uint32()).String(), count, datanodes.Head(), nil diff --git a/go/topology/volume_growth.go b/go/topology/volume_growth.go index 6124c0da2..3ad6ad757 100644 --- a/go/topology/volume_growth.go +++ b/go/topology/volume_growth.go @@ -204,7 +204,7 @@ func (vg *VolumeGrowth) grow(topo *Topology, vid storage.VolumeId, option *Volum glog.V(0).Infoln("Created Volume", vid, "on", server) } else { glog.V(0).Infoln("Failed to assign", vid, "to", servers, "error", err) - return fmt.Errorf("Failed to assign %s: %s", vid.String(), err.Error()) + return fmt.Errorf("Failed to assign %d: %v", vid, err) } } return nil |
