diff --git a/src/entry/Maat_command.cpp b/src/entry/Maat_command.cpp index fbdcf77..9d22cda 100644 --- a/src/entry/Maat_command.cpp +++ b/src/entry/Maat_command.cpp @@ -723,6 +723,8 @@ FULL_UPDATE: } *list=s_rule_array; *update_type=CM_UPDATE_TYPE_FULL; + MESA_handle_runtime_log(logger, RLOG_LV_INFO, maat_redis_monitor, + "Full update %d keys of version %lldd.", rule_num, new_version); return rule_num ; } diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 17e1288..858c662 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -34,7 +34,7 @@ #include "stream_fuzzy_hash.h" #include "gram_index_engine.h" -int MAAT_FRAME_VERSION_2_9_20200622=1; +int MAAT_FRAME_VERSION_3_0_20200619=1; int is_valid_table_name(const char* str) { diff --git a/src/entry/Maat_stat.cpp b/src/entry/Maat_stat.cpp index c97f073..9e14cbe 100644 --- a/src/entry/Maat_stat.cpp +++ b/src/entry/Maat_stat.cpp @@ -3,7 +3,7 @@ #include "Maat_garbage_collection.h" #include "alignment_int64.h" #include -#include +#include enum MAAT_FS_STATUS{ STATUS_VERSION=0, STATUS_THRED_NUM, diff --git a/test/perf_test_maatframe.cpp b/test/perf_test_maatframe.cpp index 444c31b..fd7e09b 100644 --- a/test/perf_test_maatframe.cpp +++ b/test/perf_test_maatframe.cpp @@ -55,6 +55,7 @@ int test_add_ip_command(struct Maat_command_batch* batch, const char* region_tab struct Maat_cmd_region region; memset(®ion, 0, sizeof(region)); + region.region_id=config_id; region.region_type=REGION_IP; region.table_name=region_table; region.ip_rule.addr_type=ADDR_TYPE_IPv4; @@ -144,7 +145,7 @@ protected: const char* foregin_dir="./foreign_files/"; Maat_set_feather_opt(_shared_feather, MAAT_OPT_FOREIGN_CONT_DIR, foregin_dir, strlen(foregin_dir)+1); - Maat_cmd_flushDB(_shared_feather); + // Maat_cmd_flushDB(_shared_feather); Maat_initiate_feather(_shared_feather); } static void TearDownTestCase() @@ -164,11 +165,12 @@ void* MaatCMDPerfTest::logger; //Following tests must be coded/tested at last, for they stalled the maat update thread and interrupt other tests. TEST_F(MaatCMDPerfTest, SetExpr200K) { - const int CMD_EXPR_NUM=1*1000*1000; - const int CMD_IP_NUM=1*1000*1000; + const int CMD_EXPR_NUM=2*1000*1000; + const int CMD_IP_NUM=2*1000*1000; const char* expr_table_name="HTTP_URL"; const char* ip_table_name="IP_CONFIG"; - + + int srand_keyword=171, srand_ip=73; char keyword_buf[128]; char src_ip_buff[32], dst_ip_buff[32]; @@ -178,23 +180,27 @@ TEST_F(MaatCMDPerfTest, SetExpr200K) ret=Maat_read_state(feather, MAAT_STATE_VERSION, &version_before, sizeof(version_before)); config_id=(int)Maat_cmd_incrby(feather, "TEST_SEQ", CMD_EXPR_NUM+CMD_IP_NUM); + config_id-=CMD_EXPR_NUM+CMD_IP_NUM; int i=0; + /* struct Maat_command_batch* batch=NULL; batch=Maat_command_batch_new(feather); + srand(srand_keyword); for(i=0; i