From bf0da6174c71ac6032c5a97aba059c902f799297 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 18 Mar 2010 02:59:28 +0100 Subject: [PATCH] reverted an optimization that makes Redis not stable --- redis.c | 2 ++ test-redis.tcl | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/redis.c b/redis.c index ec971419..9203d1c1 100644 --- a/redis.c +++ b/redis.c @@ -1005,9 +1005,11 @@ static int dictEncObjKeyCompare(void *privdata, const void *key1, robj *o1 = (robj*) key1, *o2 = (robj*) key2; int cmp; +#if 0 if (o1->encoding == REDIS_ENCODING_INT && o2->encoding == REDIS_ENCODING_INT && o1->ptr == o2->ptr) return 0; +#endif o1 = getDecodedObject(o1); o2 = getDecodedObject(o2); diff --git a/test-redis.tcl b/test-redis.tcl index 3ffb33e4..3dd03fd2 100644 --- a/test-redis.tcl +++ b/test-redis.tcl @@ -1763,7 +1763,6 @@ proc main {server port} { set rank [$r zrank myzset $ele] if {$rank != $index} { set err "$ele RANK is wrong! ($rank != $index)" - exit break } } -- GitLab