fix hyperscan depends ragel bug

This commit is contained in:
liuwentan
2023-03-15 15:11:07 +08:00
parent fb4043f225
commit 71d6cbab2c
5 changed files with 50 additions and 41 deletions

View File

@@ -1630,7 +1630,13 @@ int compile_runtime_commit(void *compile_runtime, const char *table_name)
struct bool_matcher *old_bool_matcher = NULL;
struct bool_matcher *new_bool_matcher = NULL;
pthread_rwlock_rdlock(&compile_rt->rwlock);
size_t compile_cnt = HASH_COUNT(compile_rt->compile_hash);
pthread_rwlock_unlock(&compile_rt->rwlock);
if (0 == compile_cnt) {
return 0;
}
log_info(compile_rt->logger, MODULE_COMPILE,
"table[%s] committing %zu compile rules for rebuilding compile bool_matcher engine",
table_name, compile_cnt);