diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index 95723d4..910ea70 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -1472,13 +1472,13 @@ void Maat_stream_scan_string_end(stream_para_t* stream_para) struct _Maat_scanner_t* scanner=sp->feather->scanner; struct _Maat_table_info_t * p_table=sp->feather->p_table_info[sp->table_id]; aligment_int64_array_add(p_table->stream_num,sp->thread_num,-1); - if(scanner!=NULL) + if(sp->rs_stream_para!=NULL) { - if(sp->version>=sp->feather->last_full_version) + if(scanner!=NULL&&sp->version>=sp->feather->last_full_version) { + DEC_SCANNER_REF(scanner, sp->thread_num); rulescan_endstream(sp->rs_stream_para); - } else { @@ -1487,15 +1487,6 @@ void Maat_stream_scan_string_end(stream_para_t* stream_para) } sp->rs_stream_para=NULL; } - else - { - if(sp->rs_stream_para!=NULL) - { - rulescan_endstream_simple(sp->rs_stream_para); - sp->feather->zombie_rs_stream--; - sp->rs_stream_para=NULL; - } - } if(sp->last_cache!=NULL) { free(sp->last_cache); diff --git a/src/entry/Maat_command.cpp b/src/entry/Maat_command.cpp index 17de4ce..d791c88 100644 --- a/src/entry/Maat_command.cpp +++ b/src/entry/Maat_command.cpp @@ -1410,9 +1410,13 @@ int Maat_cmd_commit(Maat_feather_t feather) if(transection_success5) + { + MESA_handle_runtime_log(_feather->logger,RLOG_LV_INFO,maat_command + ,"MAAT retry for %d times.", retry); + } _feather->cmd_acc_num+=_feather->cmd_q_cnt; error_out: p=_feather->cmd_qhead; diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 71d2489..c226b82 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_0_20170918=1; +int MAAT_FRAME_VERSION_2_0_20170920=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",""}; @@ -1316,6 +1316,7 @@ void rulescan_batch_update(rule_scanner_t rs_handle,MESA_lqueue_head expr_queue, } MESA_handle_runtime_log(logger,RLOG_LV_FATAL,maat_module , "rulescan_update error,when batch update %ld rules,regex error %u.",q_cnt,failed_ids[0]); + assert(0); } update_interval=(end.tv_sec-start.tv_sec)*1000000000+end.tv_nsec-start.tv_nsec; MESA_handle_runtime_log(logger,RLOG_LV_INFO,maat_module ,