summaryrefslogtreecommitdiff
path: root/src/dict.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-02-11 11:16:15 +0100
committerantirez <antirez@gmail.com>2011-02-11 11:16:15 +0100
commit05600eb8a7cb981f1a132bfba7d30f0b81f0a472 (patch)
tree0e08e9ccdfe9ad0a2dee905ace8e219856215945 /src/dict.c
parent9c104c6886c7a781b9c092775bfb20fbea1bc903 (diff)
downloadredis-05600eb8a7cb981f1a132bfba7d30f0b81f0a472.tar.gz
fixed two diskstore issues, a quasi-deadlock creating problems with I/O speed and a race condition among threads
Diffstat (limited to 'src/dict.c')
-rw-r--r--src/dict.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dict.c b/src/dict.c
index 9be7fb168..6b7010ba2 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -203,6 +203,7 @@ int dictRehash(dict *d, int n) {
/* Note that rehashidx can't overflow as we are sure there are more
* elements because ht[0].used != 0 */
+ assert(d->ht[0].size > (unsigned)d->rehashidx);
while(d->ht[0].table[d->rehashidx] == NULL) d->rehashidx++;
de = d->ht[0].table[d->rehashidx];
/* Move all the keys in this bucket from the old to the new hash HT */