dictGetRandomKey bug fixed, RANDOMKEY will not block the server anymore
This commit is contained in:
parent
ca37e9cde8
commit
6f864e6266
@ -1,3 +1,9 @@
|
|||||||
|
2009-04-22 FLUSHALL/FLUSHDB no longer sync on disk. Just increment the dirty counter by the number of elements removed, that will probably trigger a background saving operation
|
||||||
|
2009-04-21 forgot to comment testing code in PHP lib. Now it is ok
|
||||||
|
2009-04-21 PHP client ported to PHP5 and fixed
|
||||||
|
2009-04-21 doc update
|
||||||
|
2009-04-20 Non blocking replication (finally!). C-side linked lists API improved.
|
||||||
|
2009-04-19 SUNION, SUNIONSTORE, Initial work on non blocking replication
|
||||||
2009-04-10 Redis 0.091 released
|
2009-04-10 Redis 0.091 released
|
||||||
2009-04-10 SINTER/SINTERSTORE/SLEMENTS fix: misisng keys are now not errors, but just like empty sets
|
2009-04-10 SINTER/SINTERSTORE/SLEMENTS fix: misisng keys are now not errors, but just like empty sets
|
||||||
2009-04-09 doc changes
|
2009-04-09 doc changes
|
||||||
|
@ -69,6 +69,12 @@ class Redis {
|
|||||||
return $this->get_response();
|
return $this->get_response();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function mget($keys) {
|
||||||
|
$this->connect();
|
||||||
|
$this->write("MGET ".implode(" ",$keys)."\r\n");
|
||||||
|
return $this->get_response();
|
||||||
|
}
|
||||||
|
|
||||||
public function incr($name, $amount=1) {
|
public function incr($name, $amount=1) {
|
||||||
$this->connect();
|
$this->connect();
|
||||||
if ($amount == 1)
|
if ($amount == 1)
|
||||||
|
2
dict.c
2
dict.c
@ -377,7 +377,7 @@ dictEntry *dictGetRandomKey(dict *ht)
|
|||||||
unsigned int h;
|
unsigned int h;
|
||||||
int listlen, listele;
|
int listlen, listele;
|
||||||
|
|
||||||
if (ht->size == 0) return NULL;
|
if (ht->used == 0) return NULL;
|
||||||
do {
|
do {
|
||||||
h = random() & ht->sizemask;
|
h = random() & ht->sizemask;
|
||||||
he = ht->table[h];
|
he = ht->table[h];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user