diff --git a/src/expr/impl/src/udf/external.rs b/src/expr/impl/src/udf/external.rs index 0d6ba0e409386..a98e8b5c705dd 100644 --- a/src/expr/impl/src/udf/external.rs +++ b/src/expr/impl/src/udf/external.rs @@ -183,6 +183,13 @@ fn get_or_create_flight_client(link: &str) -> Result> { .expect("failed to build udf runtime") }); // create new client + static RUNTIME: LazyLock = LazyLock::new(|| { + tokio::runtime::Builder::new_multi_thread() + .thread_name("rw-udf-client") + .enable_all() + .build() + .expect("failed to build rw-udf-client runtime") + }); let client = Arc::new(tokio::task::block_in_place(|| { RUNTIME.block_on(async { let channel = connect_tonic(link).await?;