diff options
| author | zhengchao <[email protected]> | 2022-07-13 14:59:28 +0800 |
|---|---|---|
| committer | zhengchao <[email protected]> | 2022-07-13 14:59:28 +0800 |
| commit | 47a71011dbba9210e84abefd1fabb67a28a53be5 (patch) | |
| tree | 7724858bd58de6dd9b1eb0fac93d8ad882c45bc2 | |
| parent | d482a8d226809ec8318ae54f401d3f97b8e79c1b (diff) | |
| -rw-r--r-- | src/entry/Maat_command.cpp | 10 | ||||
| -rw-r--r-- | src/entry/Maat_rule.cpp | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/entry/Maat_command.cpp b/src/entry/Maat_command.cpp index 2b51850..10ec908 100644 --- a/src/entry/Maat_command.cpp +++ b/src/entry/Maat_command.cpp @@ -1761,7 +1761,9 @@ void redis_monitor_traverse(long long version, struct source_redis_ctx* m rule_num=get_rm_key_list(mr_ctx->read_ctx, version, feather->load_version_from, &new_version, feather->table_mgr, &rule_list, &update_type, logger, feather->cumulative_update_off); if(rule_num<0)//redis communication error - { + { + redisFree(mr_ctx->read_ctx); + mr_ctx->read_ctx=NULL; return; } feather->load_version_from=0;//only valid for one time. @@ -1772,9 +1774,11 @@ void redis_monitor_traverse(long long version, struct source_redis_ctx* m if(rule_num>0) { ret=get_maat_redis_value(mr_ctx->read_ctx, rule_list, rule_num, logger, 0); - if(ret<0) + if(ret<0)//redis communication error { - MESA_handle_runtime_log(logger, RLOG_LV_INFO,maat_redis_monitor, "Get Redis value failed, abandon update."); + redisFree(mr_ctx->read_ctx); + mr_ctx->read_ctx=NULL; + MESA_handle_runtime_log(logger, RLOG_LV_INFO, maat_redis_monitor, "Get Redis value failed, abandon update and close connection."); goto clean_up; } for(i=0;i<rule_num;i++) diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 7d9b43f..190ef35 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -57,7 +57,7 @@ extern "C" } #endif -int MAAT_FRAME_VERSION_3_6_10_20220630=1; +int MAAT_FRAME_VERSION_3_6_11_20220713=1; int is_valid_table_name(const char* str) { |
