fix Full config update bug https://jira.geedge.net/browse/TSG-14591
This commit is contained in:
@@ -97,7 +97,7 @@ struct maat_runtime {
|
|||||||
struct table_manager *ref_tbl_mgr; //share with maat instance
|
struct table_manager *ref_tbl_mgr; //share with maat instance
|
||||||
size_t max_table_num;
|
size_t max_table_num;
|
||||||
|
|
||||||
uint32_t rule_num;
|
long long rule_num;
|
||||||
struct maat_kv_store *sequence_map;
|
struct maat_kv_store *sequence_map;
|
||||||
|
|
||||||
struct maat_garbage_bin *ref_garbage_bin;
|
struct maat_garbage_bin *ref_garbage_bin;
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ struct compile_schema {
|
|||||||
int compile_id_column;
|
int compile_id_column;
|
||||||
int rule_tag_column;
|
int rule_tag_column;
|
||||||
int declared_clause_num_column;
|
int declared_clause_num_column;
|
||||||
struct ex_data_schema ex_schema;
|
|
||||||
int set_flag;
|
|
||||||
int table_id; //ugly
|
int table_id; //ugly
|
||||||
char table_name[NAME_MAX];
|
char table_name[NAME_MAX];
|
||||||
|
int set_flag;
|
||||||
|
struct ex_data_schema ex_schema;
|
||||||
struct table_manager *ref_tbl_mgr;
|
struct table_manager *ref_tbl_mgr;
|
||||||
struct log_handle *logger;
|
struct log_handle *logger;
|
||||||
|
|
||||||
|
|||||||
@@ -293,11 +293,6 @@ void maat_runtime_destroy(struct maat_runtime *maat_rt)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maat_rt->ref_tbl_mgr != NULL) {
|
|
||||||
table_manager_runtime_destroy(maat_rt->ref_tbl_mgr);
|
|
||||||
maat_rt->ref_tbl_mgr = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (maat_rt->sequence_map != NULL) {
|
if (maat_rt->sequence_map != NULL) {
|
||||||
maat_kv_store_free(maat_rt->sequence_map);
|
maat_kv_store_free(maat_rt->sequence_map);
|
||||||
maat_rt->sequence_map = NULL;
|
maat_rt->sequence_map = NULL;
|
||||||
|
|||||||
@@ -441,6 +441,11 @@ void maat_table_free(struct maat_table *maat_tbl)
|
|||||||
maat_tbl->runtime = NULL;
|
maat_tbl->runtime = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (maat_tbl->updating_runtime != NULL) {
|
||||||
|
maat_table_runtime_free(maat_tbl->updating_runtime, maat_tbl->table_type);
|
||||||
|
maat_tbl->updating_runtime = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
FREE(maat_tbl);
|
FREE(maat_tbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -877,6 +882,7 @@ void table_commit_updating_runtime(struct table_manager *tbl_mgr, int table_id,
|
|||||||
|
|
||||||
void *runtime = table_manager_get_runtime(tbl_mgr, table_id);
|
void *runtime = table_manager_get_runtime(tbl_mgr, table_id);
|
||||||
tbl_mgr->tbl[table_id]->runtime = updating_rt;
|
tbl_mgr->tbl[table_id]->runtime = updating_rt;
|
||||||
|
|
||||||
if (runtime != NULL) {
|
if (runtime != NULL) {
|
||||||
enum table_type *arg = ALLOC(enum table_type, 1);
|
enum table_type *arg = ALLOC(enum table_type, 1);
|
||||||
*arg = table_type;
|
*arg = table_type;
|
||||||
|
|||||||
@@ -337,7 +337,6 @@ static void random_keyword_generate(char *keyword_buf, size_t sz)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
|
||||||
class MaatFlagScan : public testing::Test
|
class MaatFlagScan : public testing::Test
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
@@ -5555,7 +5554,7 @@ TEST_F(MaatRollbackTest, FullConfigRollback) {
|
|||||||
maat_state_free(state);
|
maat_state_free(state);
|
||||||
state = NULL;
|
state = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
int main(int argc, char ** argv)
|
int main(int argc, char ** argv)
|
||||||
{
|
{
|
||||||
int ret=0;
|
int ret=0;
|
||||||
|
|||||||
Reference in New Issue
Block a user