fixed two diskstore issues, a quasi-deadlock creating problems with I/O speed and a race condition among threads

This commit is contained in:
antirez
2011-02-11 11:16:15 +01:00
parent 9c104c6886
commit 05600eb8a7
5 changed files with 37 additions and 21 deletions

View File

@ -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 */