Skip to content

Commit

Permalink
Change message to node event
Browse files Browse the repository at this point in the history
  • Loading branch information
YeunjunLee committed Dec 23, 2024
1 parent 9100598 commit 7e6e49a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/executables/master_heartbeat.c
Original file line number Diff line number Diff line change
Expand Up @@ -4154,11 +4154,10 @@ hb_cleanup_conn_and_start_process (CSS_CONN_ENTRY * conn, SOCKET sfd)
/* demote the current node */
hb_Resource->state = HB_NSTATE_SLAVE;

snprintf (error_string, LINE_MAX, "(args:%s)", proc->args);
snprintf (hb_info_str, HB_INFO_STR_MAX,
"%s Server process failure repeated within a short period of time. The current node will be demoted",
HA_FAILBACK_DIAG_STRING);
MASTER_ER_SET (ER_ERROR_SEVERITY, ARG_FILE_LINE, ER_HB_PROCESS_EVENT, 2, hb_info_str, error_string);
"%s The master node failed to restart the server process due to repeated failures within a short period of time. The current node will be demoted (args:%s)",
HA_FAILBACK_DIAG_STRING, proc->args);
MASTER_ER_SET (ER_ERROR_SEVERITY, ARG_FILE_LINE, ER_HB_NODE_EVENT, 1, hb_info_str);

error = hb_resource_job_queue (HB_RJOB_DEMOTE_START_SHUTDOWN, NULL, HB_JOB_TIMER_IMMEDIATELY);
assert (error == NO_ERROR);
Expand Down

0 comments on commit 7e6e49a

Please sign in to comment.