diff --git a/inc/Maat_rule.h b/inc/Maat_rule.h index 0163650..30a25c9 100644 --- a/inc/Maat_rule.h +++ b/inc/Maat_rule.h @@ -6,7 +6,7 @@ * to reside in the heart) of the departed would reach the paradise of afterlife * successfully. * Author: zhengchao@iie.ac.cn, MESA -* Version 2018-11-06 Maat Rule Extra Data. +* Version 2018-12-07 Plugin Extra Data. * NOTE: MUST compile with G++ * All right reserved by Institute of Infomation Engineering,Chinese Academic of Science 2014~2018 ********************************************************* diff --git a/src/entry/Maat_command.cpp b/src/entry/Maat_command.cpp index 6e18752..bb43b09 100644 --- a/src/entry/Maat_command.cpp +++ b/src/entry/Maat_command.cpp @@ -1064,19 +1064,26 @@ long long _exec_serial_rule_begin(redisContext* ctx,int rule_num, int renew_rule } return ret; } -redisReply* _exec_serial_rule_end(redisContext* ctx,long long maat_redis_version, long long server_time, int renew_allowed) +redisReply* _exec_serial_rule_end(redisContext* ctx,long long maat_redis_version, long long server_time, int renew_allowed, struct expected_reply_t* expect_reply, unsigned int *cnt) { redisReply* data_reply=NULL; if(renew_allowed==1) { redlock_unlock(ctx, rm_expire_lock); + expect_reply[*cnt].srule_seq=-1; + (*cnt)++; } if(maat_redis_version>0) { data_reply=_wrap_redisCommand(ctx,"ZADD %s NX %d %d",rm_version_sset,server_time,maat_redis_version); freeReplyObject(data_reply); + expect_reply[*cnt].srule_seq=-1; + (*cnt)++; data_reply=_wrap_redisCommand(ctx,"INCRBY MAAT_VERSION 1"); freeReplyObject(data_reply); + expect_reply[*cnt].srule_seq=-1; + expect_reply[*cnt].reply.type=REDIS_REPLY_INTEGER; + (*cnt)++; } data_reply=_wrap_redisCommand(ctx,"EXEC"); return data_reply; @@ -1247,10 +1254,10 @@ int exec_serial_rule(redisContext* ctx,struct serial_rule_t* s_rule, unsigned in assert(multi_cmd_cntelements-2<=multi_cmd_cnt); + assert(transaction_reply->elements==multi_cmd_cnt); for(i=0;ielement[i];