From b7eb935f10eb3d90a1fdf925870e366b46794367 Mon Sep 17 00:00:00 2001 From: Kexiang Wang Date: Mon, 26 Feb 2024 21:53:31 -0500 Subject: [PATCH] fix --- e2e_test/error_ui/simple/main.slt | 24 ++++++++++++++++++++++++ src/expr/udf/src/external.rs | 2 ++ 2 files changed, 26 insertions(+) diff --git a/e2e_test/error_ui/simple/main.slt b/e2e_test/error_ui/simple/main.slt index da44dfa70a1e6..57876139183ac 100644 --- a/e2e_test/error_ui/simple/main.slt +++ b/e2e_test/error_ui/simple/main.slt @@ -8,6 +8,30 @@ Caused by: Near "selet" +statement error +create function int_42() returns int as int_42 using link 'remotehost:8815'; +---- +db error: ERROR: Failed to run the query + +Caused by: + Flight service error: failed to create LoadBalancedChannel, address: remotehost:8815, err: failed to resolve IPs: Failed to resolve ServiceDefinition: failed to resolve ips from host: no record found for Query { name: Name("remotehost."), query_type: AAAA, query_class: IN } + + +statement error +create function int_42() returns int as int_42 using link '55.55.55.55:5555'; +---- +db error: ERROR: Failed to run the query + +Caused by these errors (recent errors listed first): + 1: failed to check UDF signature + 2: failed to send requests to UDF service + 3: status: Unavailable, message: "error trying to connect: tcp connect error: deadline has elapsed", details: [], metadata: MetadataMap { headers: {} } + 4: transport error + 5: error trying to connect + 6: tcp connect error + 7: deadline has elapsed + + statement error alter system set not_exist_key to value; ---- diff --git a/src/expr/udf/src/external.rs b/src/expr/udf/src/external.rs index f713ae34a1278..845429ef129a1 100644 --- a/src/expr/udf/src/external.rs +++ b/src/expr/udf/src/external.rs @@ -33,7 +33,9 @@ use tonic::transport::Channel; use crate::metrics::GLOBAL_METRICS; use crate::{Error, Result}; +/// Used for lazy udf client connections const DNS_PROBE_INTERVAL_SECS: u64 = 5; +/// Used for eager udf client connections const EAGER_DNS_PROBE_INTERVAL_SECS: u64 = 5; const REQUEST_TIMEOUT_SECS: u64 = 5; const CONNECT_TIMEOUT_SECS: u64 = 5;