SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
adjust log or error
Chris Lu132921ad4183
diff --git a/weed/server/master_grpc_server.go b/weed/server/master_grpc_server.goindex f06f5a278d..0bcde68513 100644--- a/weed/server/master_grpc_server.go+++ b/weed/server/master_grpc_server.go@@ -72,7 +72,7 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ}}- glog.V(1).Infof("master received heartbeat %s", heartbeat.String())+ glog.V(2).Infof("master received heartbeat %s", heartbeat.String())message := &master_pb.VolumeLocation{Url: dn.Url(),PublicUrl: dn.PublicUrl,diff --git a/weed/storage/store.go b/weed/storage/store.goindex 2f2c70171f..b870cee4e4 100644--- a/weed/storage/store.go+++ b/weed/storage/store.go@@ -100,7 +100,7 @@ func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKindlocation.Directory, vid, collection, replicaPlacement, ttl)if volume, err := NewVolume(location.Directory, collection, vid, needleMapKind, replicaPlacement, ttl, preallocate); err == nil {location.SetVolume(vid, volume)- glog.V(0).Info("add volume", vid)+ glog.V(0).Infof("add volume %d", vid)s.NewVolumesChan <- master_pb.VolumeShortInformationMessage{Id: uint32(vid),Collection: collection,@@ -207,7 +207,7 @@ func (s *Store) Write(i needle.VolumeId, n *needle.Needle) (size uint32, err errreturn}glog.V(0).Infoln("volume", i, "not found!")- err = fmt.Errorf("Volume %d not found!", i)+ err = fmt.Errorf("volume %d not found on %s:%d", i, s.Ip, s.Port)return}diff --git a/weed/topology/topology.go b/weed/topology/topology.goindex 44dd1484b2..902e89bd1d 100644--- a/weed/topology/topology.go+++ b/weed/topology/topology.go@@ -2,6 +2,7 @@ package topologyimport ("errors"+ "fmt""math/rand""github.com/chrislusf/raft"@@ -105,8 +106,11 @@ func (t *Topology) HasWritableVolume(option *VolumeGrowOption) bool {func (t *Topology) PickForWrite(count uint64, option *VolumeGrowOption) (string, uint64, *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 available!")+ if err != nil {+ return "", 0, nil, fmt.Errorf("failed to find writable volumes for collectio:%s replication:%s ttl:%s error: %v", option.Collection, option.ReplicaPlacement.String(), option.Ttl.String(), err)+ }+ if datanodes.Length() == 0 {+ return "", 0, nil, fmt.Errorf("no writable volumes available for for collectio:%s replication:%s ttl:%s", option.Collection, option.ReplicaPlacement.String(), option.Ttl.String())}fileId, count := t.Sequence.NextFileId(count)return needle.NewFileId(*vid, fileId, rand.Uint32()).String(), count, datanodes.Head(), nildiff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.goindex 9cdcc32359..e16356e9d2 100644--- a/weed/wdclient/masterclient.go+++ b/weed/wdclient/masterclient.go@@ -81,11 +81,11 @@ func (mc *MasterClient) tryAllMasters() {PublicUrl: volumeLocation.PublicUrl,}for _, newVid := range volumeLocation.NewVids {- glog.V(0).Infof("%s: %s adds volume %d", mc.name, loc.Url, newVid)+ glog.V(1).Infof("%s: %s adds volume %d", mc.name, loc.Url, newVid)mc.addLocation(newVid, loc)}for _, deletedVid := range volumeLocation.DeletedVids {- glog.V(0).Infof("%s: %s removes volume %d", mc.name, loc.Url, deletedVid)+ glog.V(1).Infof("%s: %s removes volume %d", mc.name, loc.Url, deletedVid)mc.deleteLocation(deletedVid, loc)}}