This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 1f5777a8c4b [fix](main) check error immediately after flight_server 
init (#52616)
1f5777a8c4b is described below

commit 1f5777a8c4b83eeebc8730461c8ff4d8d5db8174
Author: Kaijie Chen <[email protected]>
AuthorDate: Wed Jul 2 08:50:45 2025 +0800

    [fix](main) check error immediately after flight_server init (#52616)
    
    The error check for flight_server->init() was previously placed after
    starting
    the daemon thread, which could lead to unintended behavior if init
    failed.
    This change ensures early exit on failure before starting other
    services.
---
 be/src/service/doris_main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/be/src/service/doris_main.cpp b/be/src/service/doris_main.cpp
index 97356df1635..08fdeaa7c35 100644
--- a/be/src/service/doris_main.cpp
+++ b/be/src/service/doris_main.cpp
@@ -593,12 +593,12 @@ int main(int argc, char** argv) {
     std::shared_ptr<doris::flight::FlightSqlServer> flight_server =
             std::move(doris::flight::FlightSqlServer::create()).ValueOrDie();
     status = flight_server->init(doris::config::arrow_flight_sql_port);
+    stop_work_if_error(
+            status, "Arrow Flight Service did not start correctly, exiting, " 
+ status.to_string());
 
     // 6. start daemon thread to do clean or gc jobs
     doris::Daemon daemon;
     daemon.start();
-    stop_work_if_error(
-            status, "Arrow Flight Service did not start correctly, exiting, " 
+ status.to_string());
 
     exec_env->storage_engine().notify_listeners();
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to