File tree Expand file tree Collapse file tree 3 files changed +25
-26
lines changed
Expand file tree Collapse file tree 3 files changed +25
-26
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,6 @@ void display_version();
6868
6969void mworker_accept_wrapper (int fd );
7070void mworker_reload (int hardreload );
71- void mworker_on_new_child_failure (void );
7271
7372/* to be used with warned and WARN_* */
7473static inline int already_warned (unsigned int warning )
Original file line number Diff line number Diff line change @@ -914,31 +914,6 @@ static void mworker_loop()
914914 run_thread_poll_loop (NULL );
915915}
916916
917- /*
918- * Performs some routines for the worker process, which has failed the reload,
919- * updates the global load_status.
920- */
921- void mworker_on_new_child_failure ()
922- {
923- struct mworker_proc * child ;
924-
925- /* increment the number of failed reloads */
926- list_for_each_entry (child , & proc_list , list ) {
927- child -> failedreloads ++ ;
928- }
929-
930- /* do not keep unused FDs retrieved from the previous process */
931- sock_drop_unused_old_sockets ();
932-
933- usermsgs_clr (NULL );
934- load_status = 0 ;
935- ha_warning ("Failed to load worker!\n" );
936- /* the sd_notify API is not able to send a reload failure signal. So
937- * the READY=1 signal still need to be sent */
938- if (global .tune .options & GTUNE_USE_SYSTEMD )
939- sd_notify (0 , "READY=1\nSTATUS=Reload failed!\n" );
940- }
941-
942917/*
943918 * Exit with an error message upon a master recovery mode failure.
944919 */
Original file line number Diff line number Diff line change @@ -313,6 +313,31 @@ void mworker_catch_sigterm(struct sig_handler *sh)
313313 mworker_kill (sig );
314314}
315315
316+ /*
317+ * Performs some routines for the worker process, which has failed the reload,
318+ * updates the global load_status.
319+ */
320+ static void mworker_on_new_child_failure ()
321+ {
322+ struct mworker_proc * child ;
323+
324+ /* increment the number of failed reloads */
325+ list_for_each_entry (child , & proc_list , list ) {
326+ child -> failedreloads ++ ;
327+ }
328+
329+ /* do not keep unused FDs retrieved from the previous process */
330+ sock_drop_unused_old_sockets ();
331+
332+ usermsgs_clr (NULL );
333+ load_status = 0 ;
334+ ha_warning ("Failed to load worker!\n" );
335+ /* the sd_notify API is not able to send a reload failure signal. So
336+ * the READY=1 signal still need to be sent */
337+ if (global .tune .options & GTUNE_USE_SYSTEMD )
338+ sd_notify (0 , "READY=1\nSTATUS=Reload failed!\n" );
339+ }
340+
316341/*
317342 * Wait for every children to exit
318343 */
You can’t perform that action at this time.
0 commit comments