修复zombie_stream计数不准确的bug。

This commit is contained in:
zhengchao
2017-09-21 10:23:04 +08:00
parent b3d1e45c34
commit 575c657434
3 changed files with 10 additions and 14 deletions

View File

@@ -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);