diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index c0a63f3..b1c339a 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -982,7 +982,11 @@ int Maat_table_callback_register(Maat_feather_t feather,short table_id, pthread_mutex_unlock(&(_feather->background_update_mutex)); return -1; } - + if(!_feather->scanner) + { + pthread_mutex_unlock(&(_feather->background_update_mutex)); + return 1; + } const char* line=NULL; struct Maat_table_runtime* table_rt=NULL; table_rt=Maat_table_runtime_get(_feather->scanner->table_rt_mgr, table_id); diff --git a/src/entry/Maat_command.cpp b/src/entry/Maat_command.cpp index ebe9417..353667b 100644 --- a/src/entry/Maat_command.cpp +++ b/src/entry/Maat_command.cpp @@ -2374,7 +2374,7 @@ int Maat_cmd_commit(Maat_feather_t feather) { _Maat_feather_t* _feather=(_Maat_feather_t*)feather; - int ret=0,i=0; + int ret=-1, i=0; int new_region_num=0,new_group_num=0; int serial_rule_num=0,serial_rule_idx=0; UNUSED int transaction_success=1; @@ -2386,7 +2386,7 @@ int Maat_cmd_commit(Maat_feather_t feather) struct serial_rule_t* s_rule=NULL; if(_feather->input_mode!=SOURCE_REDIS) { - return -1; + return ret; } if(_feather->cmd_q_cnt==0) { @@ -2414,7 +2414,6 @@ int Maat_cmd_commit(Maat_feather_t feather) if(data_reply->type!=REDIS_REPLY_INTEGER) { freeReplyObject(data_reply); - ret=-1; goto error_out; } _feather->base_rgn_seq=data_reply->integer-new_region_num; @@ -2424,7 +2423,6 @@ int Maat_cmd_commit(Maat_feather_t feather) if(data_reply->type!=REDIS_REPLY_INTEGER) { freeReplyObject(data_reply); - ret=-1; goto error_out; } _feather->base_grp_seq=data_reply->integer-new_group_num; diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 18ba8d3..d0eb3e8 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -33,7 +33,7 @@ #include "stream_fuzzy_hash.h" #include "gram_index_engine.h" -int MAAT_FRAME_VERSION_2_8_20190816=1; +int MAAT_FRAME_VERSION_2_8_20190827=1; int is_valid_table_name(const char* str) {