完善Redis错误处理。
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user