清理Maat_status时,使用精确的version上下界代替-inf,避免序列号回滚。

This commit is contained in:
zhengchao
2017-08-11 09:17:28 +08:00
parent f72cf74b8c
commit 0a64602d2a

View File

@@ -879,7 +879,8 @@ void cleanup_update_status(redisContext *ctx, void *logger)
version_upper_bound=read_redis_integer(sub_reply->element[sub_reply->elements-1]);
freeReplyObject(reply);
reply=_wrap_redisCommand(ctx,"ZREMRANGEBYSCORE %s -inf %lld",rm_expire_sset,version_upper_bound);
//For maat_version reset, do NOT use -inf to upper bound intentionally.
reply=_wrap_redisCommand(ctx,"ZREMRANGEBYSCORE %s %lld %lld",rm_expire_sset,version_lower_bound,version_upper_bound);
entry_num=read_redis_integer(reply);
freeReplyObject(reply);