对命中clause_id的数量设置上限,避免同时命中compile数量过多时,utarray排序耗时过大。
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
#include "Maat_hierarchy.h"
|
||||
#include "Maat_utils.h"
|
||||
#include "Maat_limits.h"
|
||||
|
||||
#include "uthash/uthash.h"
|
||||
#include "uthash/utarray.h"
|
||||
@@ -1117,6 +1118,8 @@ void Maat_hierarchy_compile_mid_udpate(struct Maat_hierarchy_compile_mid* mid, i
|
||||
assert(*(unsigned long long*)tmp == clause_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(utarray_len(mid->_all_hit_clause_array)<MAX_GROUP_CACHE)
|
||||
{
|
||||
utarray_push_back(mid->_all_hit_clause_array, &clause_id);
|
||||
utarray_sort(mid->_all_hit_clause_array, compare_clause_id);
|
||||
@@ -1124,6 +1127,7 @@ void Maat_hierarchy_compile_mid_udpate(struct Maat_hierarchy_compile_mid* mid, i
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pthread_rwlock_unlock(&hier->rwlock);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ extern "C"
|
||||
}
|
||||
#endif
|
||||
|
||||
int MAAT_FRAME_VERSION_3_1_4_20201104=1;
|
||||
int MAAT_FRAME_VERSION_3_1_4_20201124=1;
|
||||
|
||||
int is_valid_table_name(const char* str)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user