* fix: resolve gRPC DNS resolution issues in Kubernetes #8384 - Replace direct `grpc.NewClient` calls with `pb.GrpcDial` for consistent connection establishment - Fix async DNS resolution behavior in K8s with `ndots:5` - Ensure high-level components use established helper for reliable networking * refactor: refine gRPC DNS fix and add documentation - Use instance's grpcDialOption in BrokerClient.ConfigureTopic - Add detailed comments to GrpcDial explaining Kubernetes DNS resolution rationale * fix: ensure proper context propagation in broker_client gRPC calls - Pass the provided `ctx` to `pb.GrpcDial` in `ConfigureTopic` and `GetUnflushedMessages` - Ensures that timeouts and cancellations are correctly honored during connection establishment * docs: refine gRPC resolver documentation and cleanup dead code - Enhanced documentation for `GrpcDial` with explicit warnings about global state mutation when using `resolver.SetDefaultScheme("passthrough")`. - Recommended `passthrough:///` prefix as the primary migration path for `grpc.NewClient`. - Removed dead commented-out code for `grpc.WithBlock()` and `grpc.WithTimeout()`.
This commit is contained in:
@@ -51,7 +51,7 @@ func (fds *FilerDiscoveryService) discoverFilersFromMaster(masterAddr pb.ServerA
|
||||
// Convert HTTP master address to gRPC address (HTTP port + 10000)
|
||||
grpcAddr := masterAddr.ToGrpcAddress()
|
||||
|
||||
conn, err := grpc.NewClient(grpcAddr, fds.grpcDialOption)
|
||||
conn, err := pb.GrpcDial(context.Background(), grpcAddr, false, fds.grpcDialOption)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to connect to master at %s: %v", grpcAddr, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user