From 91a46e45bcaa643525e515e88c18e26f5317eeb7 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Tue, 27 Feb 2018 19:31:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84Redis=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=A4=84=E7=90=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_command.cpp | 9 ++++++++- src/entry/Maat_rule.cpp | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/entry/Maat_command.cpp b/src/entry/Maat_command.cpp index 2a6fb45..5eea35a 100644 --- a/src/entry/Maat_command.cpp +++ b/src/entry/Maat_command.cpp @@ -582,7 +582,14 @@ int _get_maat_redis_value(redisContext *c,struct serial_rule_t* rule_list,int ru ,rule_list[idx].table_name ,rule_list[idx].rule_id); reply=_wrap_redisCommand(c, redis_cmd); - assert(reply->type==REDIS_REPLY_STRING); + if(reply->type!=REDIS_REPLY_STRING)//Handle: "Loading Redis is loading the database in memory" or "nil" + { + MESA_handle_runtime_log(logger,RLOG_LV_FATAL,maat_redis_monitor + ,"Redis cmd=%s Error, Reply type=%d, str=%s",redis_cmd, reply->type, reply->str); + freeReplyObject(reply); + free(retry_ids); + return -1; + } rule_list[idx].table_line=_maat_strdup(reply->str); freeReplyObject(reply); } diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 3bc013f..a4be31c 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -30,7 +30,7 @@ #include "stream_fuzzy_hash.h" #include "gram_index_engine.h" -int MAAT_FRAME_VERSION_2_1_20180226=1; +int MAAT_FRAME_VERSION_2_1_20180227=1; const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin", "unicode_ascii_esc","unicode_ascii_aligned","unicode_ncr_dec","unicode_ncr_hex","url_encode_gb2312","url_encode_utf8",""};