mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Merge branch 'unstable' of github.com:/antirez/redis into unstable
This commit is contained in:
commit
8b20112860
@ -484,7 +484,7 @@ static int _anetTcpServer(char *err, int port, char *bindaddr, int af, int backl
|
|||||||
|
|
||||||
if (af == AF_INET6 && anetV6Only(err,s) == ANET_ERR) goto error;
|
if (af == AF_INET6 && anetV6Only(err,s) == ANET_ERR) goto error;
|
||||||
if (anetSetReuseAddr(err,s) == ANET_ERR) goto error;
|
if (anetSetReuseAddr(err,s) == ANET_ERR) goto error;
|
||||||
if (anetListen(err,s,p->ai_addr,p->ai_addrlen,backlog) == ANET_ERR) goto error;
|
if (anetListen(err,s,p->ai_addr,p->ai_addrlen,backlog) == ANET_ERR) s = ANET_ERR;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
|
@ -283,6 +283,7 @@ void handleClientsBlockedOnKeys(void) {
|
|||||||
|
|
||||||
if (listTypeLength(o) == 0) {
|
if (listTypeLength(o) == 0) {
|
||||||
dbDelete(rl->db,rl->key);
|
dbDelete(rl->db,rl->key);
|
||||||
|
notifyKeyspaceEvent(NOTIFY_GENERIC,"del",rl->key,rl->db->id);
|
||||||
}
|
}
|
||||||
/* We don't call signalModifiedKey() as it was already called
|
/* We don't call signalModifiedKey() as it was already called
|
||||||
* when an element was pushed on the list. */
|
* when an element was pushed on the list. */
|
||||||
|
@ -600,8 +600,7 @@ clusterLink *createClusterLink(clusterNode *node) {
|
|||||||
* with this link will have the 'link' field set to NULL. */
|
* with this link will have the 'link' field set to NULL. */
|
||||||
void freeClusterLink(clusterLink *link) {
|
void freeClusterLink(clusterLink *link) {
|
||||||
if (link->fd != -1) {
|
if (link->fd != -1) {
|
||||||
aeDeleteFileEvent(server.el, link->fd, AE_WRITABLE);
|
aeDeleteFileEvent(server.el, link->fd, AE_READABLE|AE_WRITABLE);
|
||||||
aeDeleteFileEvent(server.el, link->fd, AE_READABLE);
|
|
||||||
}
|
}
|
||||||
sdsfree(link->sndbuf);
|
sdsfree(link->sndbuf);
|
||||||
sdsfree(link->rcvbuf);
|
sdsfree(link->rcvbuf);
|
||||||
|
3
src/db.c
3
src/db.c
@ -187,9 +187,6 @@ void dbOverwrite(redisDb *db, robj *key, robj *val) {
|
|||||||
int saved_lru = old->lru;
|
int saved_lru = old->lru;
|
||||||
dictReplace(db->dict, key->ptr, val);
|
dictReplace(db->dict, key->ptr, val);
|
||||||
val->lru = saved_lru;
|
val->lru = saved_lru;
|
||||||
/* LFU should be not only copied but also updated
|
|
||||||
* when a key is overwritten. */
|
|
||||||
updateLFU(val);
|
|
||||||
} else {
|
} else {
|
||||||
dictReplace(db->dict, key->ptr, val);
|
dictReplace(db->dict, key->ptr, val);
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ robj *createEmbeddedStringObject(const char *ptr, size_t len) {
|
|||||||
* OBJ_ENCODING_EMBSTR_SIZE_LIMIT, otherwise the RAW encoding is
|
* OBJ_ENCODING_EMBSTR_SIZE_LIMIT, otherwise the RAW encoding is
|
||||||
* used.
|
* used.
|
||||||
*
|
*
|
||||||
* The current limit of 39 is chosen so that the biggest string object
|
* The current limit of 44 is chosen so that the biggest string object
|
||||||
* we allocate as EMBSTR will still fit into the 64 byte arena of jemalloc. */
|
* we allocate as EMBSTR will still fit into the 64 byte arena of jemalloc. */
|
||||||
#define OBJ_ENCODING_EMBSTR_SIZE_LIMIT 44
|
#define OBJ_ENCODING_EMBSTR_SIZE_LIMIT 44
|
||||||
robj *createStringObject(const char *ptr, size_t len) {
|
robj *createStringObject(const char *ptr, size_t len) {
|
||||||
|
@ -639,6 +639,10 @@ int serveClientBlockedOnList(client *receiver, robj *key, robj *dstkey, redisDb
|
|||||||
addReplyMultiBulkLen(receiver,2);
|
addReplyMultiBulkLen(receiver,2);
|
||||||
addReplyBulk(receiver,key);
|
addReplyBulk(receiver,key);
|
||||||
addReplyBulk(receiver,value);
|
addReplyBulk(receiver,value);
|
||||||
|
|
||||||
|
/* Notify event. */
|
||||||
|
char *event = (where == LIST_HEAD) ? "lpop" : "rpop";
|
||||||
|
notifyKeyspaceEvent(NOTIFY_LIST,event,key,receiver->db->id);
|
||||||
} else {
|
} else {
|
||||||
/* BRPOPLPUSH */
|
/* BRPOPLPUSH */
|
||||||
robj *dstobj =
|
robj *dstobj =
|
||||||
@ -663,6 +667,9 @@ int serveClientBlockedOnList(client *receiver, robj *key, robj *dstkey, redisDb
|
|||||||
db->id,argv,3,
|
db->id,argv,3,
|
||||||
PROPAGATE_AOF|
|
PROPAGATE_AOF|
|
||||||
PROPAGATE_REPL);
|
PROPAGATE_REPL);
|
||||||
|
|
||||||
|
/* Notify event ("lpush" was notified by rpoplpushHandlePush). */
|
||||||
|
notifyKeyspaceEvent(NOTIFY_LIST,"rpop",key,receiver->db->id);
|
||||||
} else {
|
} else {
|
||||||
/* BRPOPLPUSH failed because of wrong
|
/* BRPOPLPUSH failed because of wrong
|
||||||
* destination type. */
|
* destination type. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user