pb: return empty server address for malformed grpc addresses

GrpcAddressToServerAddress used to return the unparseable input on a
hostAndPort failure, so a malformed raft address (e.g. "host:abc")
flowed into admin dashboard master maps unchanged. Return an empty
string instead, skip empty conversions at the two raft-cluster merge
sites, and drop the now-stale comment about the fatal exit the earlier
commit removed.
This commit is contained in:
Chris Lu committed 2026-09-18 11:34:05 -07:00
1 parent 0ae7874ed9
commit 0d6024e2e0
3 files changed
+10 -4

No files matched your search

+3
View File
@@ -1351,6 +1351,9 @@ func (s *AdminServer) GetClusterMasters() (*ClusterMastersData, error) {
for _, server := range resp.ClusterServers {
// Raft stores gRPC addresses, convert to HTTP address
httpAddress := pb.GrpcAddressToServerAddress(server.Address)
if httpAddress == "" {
continue
}
// Update existing master info or create new one
if masterInfo, exists := masterMap[httpAddress]; exists {