Skip to content

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.

pass along volume server grpc port

chrislu3e7a92061b72
diff --git a/weed/server/master_grpc_server.go b/weed/server/master_grpc_server.go
index 8feb909ad8..b989da424e 100644
--- a/weed/server/master_grpc_server.go
+++ b/weed/server/master_grpc_server.go
@@ -73,6 +73,7 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
DataCenter: dn.GetDataCenterId(),
Url: dn.Url(),
PublicUrl: dn.PublicUrl,
+ GrpcPort: uint32(dn.GrpcPort),
}
for _, v := range dn.GetVolumes() {
message.DeletedVids = append(message.DeletedVids, uint32(v.Id))
@@ -166,6 +167,7 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
Url: dn.Url(),
PublicUrl: dn.PublicUrl,
DataCenter: dn.GetDataCenterId(),
+ GrpcPort: uint32(dn.GrpcPort),
}
if len(heartbeat.NewVolumes) > 0 {
stats.MasterReceivedHeartbeatCounter.WithLabelValues("newVolumes").Inc()
diff --git a/weed/topology/topology_info.go b/weed/topology/topology_info.go
index afbeb48949..120ae0d42a 100644
--- a/weed/topology/topology_info.go
+++ b/weed/topology/topology_info.go
@@ -80,6 +80,7 @@ func (t *Topology) ToVolumeLocations() (volumeLocations []*master_pb.VolumeLocat
Url: dn.Url(),
PublicUrl: dn.PublicUrl,
DataCenter: dn.GetDataCenterId(),
+ GrpcPort: uint32(dn.GrpcPort),
}
for _, v := range dn.GetVolumes() {
volumeLocation.NewVids = append(volumeLocation.NewVids, uint32(v.Id))
diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go
index 44b8b62866..cfc31c8b17 100644
--- a/weed/topology/volume_growth.go
+++ b/weed/topology/volume_growth.go
@@ -129,6 +129,7 @@ func (vg *VolumeGrowth) findAndGrow(grpcDialOption grpc.DialOption, topo *Topolo
Url: server.Url(),
PublicUrl: server.PublicUrl,
DataCenter: server.GetDataCenterId(),
+ GrpcPort: uint32(server.GrpcPort),
NewVids: []uint32{uint32(vid)},
})
}