diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-10-17 22:11:50 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-17 22:11:50 -0700 |
| commit | 97f30287821e1c49b816f2e4c05be46728b06a0b (patch) | |
| tree | 1169d6e45c06698fc4081b8cfc27f2d4d2e98684 /weed/query | |
| parent | 8d63a9cf5f011baa4b86372b4f28b7179b9dc9cb (diff) | |
| download | seaweedfs-97f30287821e1c49b816f2e4c05be46728b06a0b.tar.xz seaweedfs-97f30287821e1c49b816f2e4c05be46728b06a0b.zip | |
Clean up logs and deprecated functions (#7339)
* less logs
* fix deprecated grpc.Dial
Diffstat (limited to 'weed/query')
| -rw-r--r-- | weed/query/engine/broker_client.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/query/engine/broker_client.go b/weed/query/engine/broker_client.go index 3e6517678..c1b1cab6f 100644 --- a/weed/query/engine/broker_client.go +++ b/weed/query/engine/broker_client.go @@ -58,7 +58,7 @@ func (c *BrokerClient) discoverFiler() error { return nil // already discovered } - conn, err := grpc.Dial(c.masterAddress, c.grpcDialOption) + conn, err := grpc.NewClient(c.masterAddress, c.grpcDialOption) if err != nil { return fmt.Errorf("failed to connect to master at %s: %v", c.masterAddress, err) } @@ -99,7 +99,7 @@ func (c *BrokerClient) findBrokerBalancer() error { return fmt.Errorf("failed to discover filer: %v", err) } - conn, err := grpc.Dial(c.filerAddress, c.grpcDialOption) + conn, err := grpc.NewClient(c.filerAddress, c.grpcDialOption) if err != nil { return fmt.Errorf("failed to connect to filer at %s: %v", c.filerAddress, err) } @@ -143,7 +143,7 @@ type filerClientImpl struct { // WithFilerClient executes a function with a connected filer client func (f *filerClientImpl) WithFilerClient(followRedirect bool, fn func(client filer_pb.SeaweedFilerClient) error) error { - conn, err := grpc.Dial(f.filerAddress, f.grpcDialOption) + conn, err := grpc.NewClient(f.filerAddress, f.grpcDialOption) if err != nil { return fmt.Errorf("failed to connect to filer at %s: %v", f.filerAddress, err) } @@ -317,7 +317,7 @@ func (c *BrokerClient) ConfigureTopic(ctx context.Context, namespace, topicName return err } - conn, err := grpc.Dial(c.brokerAddress, grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.NewClient(c.brokerAddress, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { return fmt.Errorf("failed to connect to broker at %s: %v", c.brokerAddress, err) } @@ -429,7 +429,7 @@ func (c *BrokerClient) GetUnflushedMessages(ctx context.Context, namespace, topi glog.V(2).Infof("Found broker at address: %s", c.brokerAddress) // Step 2: Connect to broker - conn, err := grpc.Dial(c.brokerAddress, c.grpcDialOption) + conn, err := grpc.NewClient(c.brokerAddress, c.grpcDialOption) if err != nil { glog.V(2).Infof("Failed to connect to broker %s: %v", c.brokerAddress, err) // Return empty slice if connection fails - prevents double-counting |
