【重要更新】MAAT Redis事务增加预备主版本号机制,以改善多写入性能,提高配置超时淘汰速度。

This commit is contained in:
zhengchao
2018-05-23 21:37:35 +08:00
parent bc8d7df7e0
commit 1cef03375a
3 changed files with 3 additions and 4 deletions

View File

@@ -796,9 +796,7 @@ long long _exec_serial_rule_begin(redisContext* ctx)
{
long long maat_redis_version=0;
redisReply* data_reply=NULL;
data_reply=_wrap_redisCommand(ctx, "WATCH MAAT_VERSION");
freeReplyObject(data_reply);
data_reply=_wrap_redisCommand(ctx, "GET MAAT_VERSION");
data_reply=_wrap_redisCommand(ctx, "INCRBY MAAT_PRE_VER 1");
maat_redis_version=read_redis_integer(data_reply);
maat_redis_version++;
freeReplyObject(data_reply);