diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index cb61027..75ae72e 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -28,7 +28,7 @@ #include "mesa_fuzzy.h" #include "great_index_engine.h" -int MAAT_FRAME_VERSION_1_8_20161228=1; +int MAAT_FRAME_VERSION_1_8_20170111=1; const char *maat_module="MAAT Frame"; const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin", @@ -2976,8 +2976,9 @@ void *thread_rule_monitor(void *arg) { snprintf(maat_name,sizeof(maat_name),"MAAT"); } - //ret=prctl(PR_SET_NAME,(unsigned long long)maat_name,NULL,NULL,NULL); - ret=pthread_setname_np(pthread_self(),maat_name); + ret=prctl(PR_SET_NAME,(unsigned long long)maat_name,NULL,NULL,NULL); + //pthread_setname_np are introduced in glibc2.12 + //ret=pthread_setname_np(pthread_self(),maat_name); assert(ret>=0); while(feather->still_working) { diff --git a/test/Makefile b/test/Makefile index 089366a..bde0217 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,7 +1,7 @@ LIBS=../lib/libmaatframe.so INC=-I../inc/ -I/usr/include/MESA/ all: - g++ -o maat_test -g -Wall maat_test.cpp $(INC) $(LIBS) + g++ -o maat_test -g -Wall maat_test.cpp $(INC) $(LIBS) -lMESA_handle_logger g++ -o digest_gen -g digest_gen.c $(INC) $(LIBS) clean: rm maat_test test.log* -f diff --git a/test/maat_test.cpp b/test/maat_test.cpp index d8a28b4..df24a86 100644 --- a/test/maat_test.cpp +++ b/test/maat_test.cpp @@ -472,6 +472,8 @@ int main(int argc,char* argv[]) void *logger=MESA_create_runtime_log_handle(log_file,0); feather=Maat_feather(g_iThreadNum, table_info_path, logger); + Maat_set_feather_opt(feather,MAAT_OPT_INSTANCE_NAME,"demo", strlen("demo")+1); + if(argc>1&&0==strcmp(argv[1],"update")) { Maat_set_feather_opt(feather, MAAT_OPT_FULL_CFG_DIR, ful_cfg_dir, strlen(ful_cfg_dir)+1);