From 89a39e85d3b4facb698a46b72441101d829484fe Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Tue, 17 May 2022 14:58:15 +0800 Subject: [PATCH] add macro SF_CLUSTER_ERROR_BINLOG_MISSED --- src/sf_define.h | 5 +++-- src/sf_util.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sf_define.h b/src/sf_define.h index 7ca2d94..c823634 100644 --- a/src/sf_define.h +++ b/src/sf_define.h @@ -45,8 +45,9 @@ #define SF_NIO_TASK_STAGE_FETCH(task) task->nio_stages.current #define SF_SESSION_ERROR_NOT_EXIST 9992 -#define SF_CLUSTER_ERROR_NOT_LEADER 9996 -#define SF_CLUSTER_ERROR_LEADER_VERSION_INCONSISTENT 9997 +#define SF_CLUSTER_ERROR_NOT_LEADER 9995 +#define SF_CLUSTER_ERROR_LEADER_VERSION_INCONSISTENT 9996 +#define SF_CLUSTER_ERROR_BINLOG_MISSED 9997 #define SF_CLUSTER_ERROR_BINLOG_INCONSISTENT 9998 #define SF_CLUSTER_ERROR_LEADER_INCONSISTENT 9999 #define SF_CLUSTER_ERROR_MASTER_INCONSISTENT SF_CLUSTER_ERROR_LEADER_INCONSISTENT diff --git a/src/sf_util.c b/src/sf_util.c index f8eb7f1..9c04db6 100644 --- a/src/sf_util.c +++ b/src/sf_util.c @@ -311,6 +311,8 @@ ScheduleEntry *sf_logger_set_schedule_entry(struct log_context *pContext, const char *sf_strerror(const int errnum) { switch (errnum) { + case SF_CLUSTER_ERROR_BINLOG_MISSED: + return "binlog missed"; case SF_CLUSTER_ERROR_BINLOG_INCONSISTENT: return "binlog inconsistent"; case SF_CLUSTER_ERROR_LEADER_INCONSISTENT: