Merge branch 'trival-allow-renew-no-timeout-rule' into 'master'
Trival allow renew no timeout rule See merge request MESA_framework/maat!14
This commit is contained in:
@@ -1181,8 +1181,7 @@ void _exec_serial_rule(redisContext* ctx, long long version, struct serial_rule_
|
||||
continue;
|
||||
}
|
||||
//s_rule[i].timeout>0 was checked by caller.
|
||||
//XX: Only update elements that already exist. Never add elements.
|
||||
redisAppendCommand(ctx,"ZADD %s XX %lld %s,%d",rm_expire_sset
|
||||
redisAppendCommand(ctx,"ZADD %s %lld %s,%d",rm_expire_sset
|
||||
,s_rule[i].timeout
|
||||
,s_rule[i].table_name
|
||||
,s_rule[i].rule_id);
|
||||
@@ -2074,12 +2073,11 @@ int Maat_cmd_set_lines(Maat_feather_t feather,const struct Maat_line_t** line_ru
|
||||
}
|
||||
set_serial_rule(s_rule+i, op,line_rule[i]->rule_id,line_rule[i]->label_id,line_rule[i]->table_name,line_rule[i]->table_line, absolute_expire_time);
|
||||
}
|
||||
success_cnt=exec_serial_rule(_feather->redis_write_ctx,s_rule, line_num,server_time,_feather->logger);
|
||||
success_cnt=exec_serial_rule(_feather->redis_write_ctx,s_rule, line_num,server_time,_feather->logger);
|
||||
if(success_cnt<0||success_cnt!=line_num)//error
|
||||
{
|
||||
ret=-1;
|
||||
goto error_out;
|
||||
}
|
||||
}
|
||||
ret=success_cnt;
|
||||
_feather->line_cmd_acc_num+=success_cnt;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "stream_fuzzy_hash.h"
|
||||
#include "gram_index_engine.h"
|
||||
|
||||
int MAAT_FRAME_VERSION_2_4_20181115=1;
|
||||
int MAAT_FRAME_VERSION_2_4_20181120=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",""};
|
||||
@@ -1002,7 +1002,7 @@ void _destroy_compile_rule(struct _Maat_compile_inner_t * compile_rule)
|
||||
free(db_compile_rule);
|
||||
compile_rule->db_c_rule=NULL;
|
||||
}
|
||||
for(i=0; i<table->ex_data_num; i++)
|
||||
for(i=0; table!=NULL && i<table->ex_data_num; i++)
|
||||
{
|
||||
rule_ex_data_free(&(db_compile_rule->m_rule_head), db_compile_rule->service_defined, compile_rule->ads+i, table->ex_desc+i);
|
||||
compile_rule->ads[i]=NULL;
|
||||
|
||||
@@ -46,7 +46,7 @@ typedef int atomic_t;
|
||||
#define MAX_PLUGIN_PER_TABLE 32
|
||||
#define MAX_FOREIGN_CLMN_NUM 8
|
||||
#define MAX_SCANNER_HIT_NUM 64
|
||||
#define MAX_COMPILE_EX_DATA_NUM 8
|
||||
#define MAX_COMPILE_EX_DATA_NUM 2
|
||||
#define MAX_GROUP_CACHE 128
|
||||
|
||||
#define MAX_FAILED_NUM 128
|
||||
|
||||
Reference in New Issue
Block a user