struct dictEntry -> dictEntry.
This commit is contained in:
parent
5317f5e99a
commit
82b53c650c
@ -685,7 +685,7 @@ void clusterDelNode(clusterNode *delnode) {
|
|||||||
/* Node lookup by name */
|
/* Node lookup by name */
|
||||||
clusterNode *clusterLookupNode(char *name) {
|
clusterNode *clusterLookupNode(char *name) {
|
||||||
sds s = sdsnewlen(name, REDIS_CLUSTER_NAMELEN);
|
sds s = sdsnewlen(name, REDIS_CLUSTER_NAMELEN);
|
||||||
struct dictEntry *de;
|
dictEntry *de;
|
||||||
|
|
||||||
de = dictFind(server.cluster->nodes,s);
|
de = dictFind(server.cluster->nodes,s);
|
||||||
sdsfree(s);
|
sdsfree(s);
|
||||||
@ -1770,7 +1770,7 @@ void clusterSendPing(clusterLink *link, int type) {
|
|||||||
|
|
||||||
/* Populate the gossip fields */
|
/* Populate the gossip fields */
|
||||||
while(freshnodes > 0 && gossipcount < 3) {
|
while(freshnodes > 0 && gossipcount < 3) {
|
||||||
struct dictEntry *de = dictGetRandomKey(server.cluster->nodes);
|
dictEntry *de = dictGetRandomKey(server.cluster->nodes);
|
||||||
clusterNode *this = dictGetVal(de);
|
clusterNode *this = dictGetVal(de);
|
||||||
clusterMsgDataGossip *gossip;
|
clusterMsgDataGossip *gossip;
|
||||||
int j;
|
int j;
|
||||||
|
4
src/db.c
4
src/db.c
@ -104,7 +104,7 @@ void dbAdd(redisDb *db, robj *key, robj *val) {
|
|||||||
*
|
*
|
||||||
* The program is aborted if the key was not already present. */
|
* The program is aborted if the key was not already present. */
|
||||||
void dbOverwrite(redisDb *db, robj *key, robj *val) {
|
void dbOverwrite(redisDb *db, robj *key, robj *val) {
|
||||||
struct dictEntry *de = dictFind(db->dict,key->ptr);
|
dictEntry *de = dictFind(db->dict,key->ptr);
|
||||||
|
|
||||||
redisAssertWithInfo(NULL,key,de != NULL);
|
redisAssertWithInfo(NULL,key,de != NULL);
|
||||||
dictReplace(db->dict, key->ptr, val);
|
dictReplace(db->dict, key->ptr, val);
|
||||||
@ -136,7 +136,7 @@ int dbExists(redisDb *db, robj *key) {
|
|||||||
*
|
*
|
||||||
* The function makes sure to return keys not already expired. */
|
* The function makes sure to return keys not already expired. */
|
||||||
robj *dbRandomKey(redisDb *db) {
|
robj *dbRandomKey(redisDb *db) {
|
||||||
struct dictEntry *de;
|
dictEntry *de;
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
sds key;
|
sds key;
|
||||||
|
@ -50,7 +50,7 @@ int listMatchPubsubPattern(void *a, void *b) {
|
|||||||
/* Subscribe a client to a channel. Returns 1 if the operation succeeded, or
|
/* Subscribe a client to a channel. Returns 1 if the operation succeeded, or
|
||||||
* 0 if the client was already subscribed to that channel. */
|
* 0 if the client was already subscribed to that channel. */
|
||||||
int pubsubSubscribeChannel(redisClient *c, robj *channel) {
|
int pubsubSubscribeChannel(redisClient *c, robj *channel) {
|
||||||
struct dictEntry *de;
|
dictEntry *de;
|
||||||
list *clients = NULL;
|
list *clients = NULL;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ int pubsubSubscribeChannel(redisClient *c, robj *channel) {
|
|||||||
/* Unsubscribe a client from a channel. Returns 1 if the operation succeeded, or
|
/* Unsubscribe a client from a channel. Returns 1 if the operation succeeded, or
|
||||||
* 0 if the client was not subscribed to the specified channel. */
|
* 0 if the client was not subscribed to the specified channel. */
|
||||||
int pubsubUnsubscribeChannel(redisClient *c, robj *channel, int notify) {
|
int pubsubUnsubscribeChannel(redisClient *c, robj *channel, int notify) {
|
||||||
struct dictEntry *de;
|
dictEntry *de;
|
||||||
list *clients;
|
list *clients;
|
||||||
listNode *ln;
|
listNode *ln;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
@ -218,7 +218,7 @@ int pubsubUnsubscribeAllPatterns(redisClient *c, int notify) {
|
|||||||
/* Publish a message */
|
/* Publish a message */
|
||||||
int pubsubPublishMessage(robj *channel, robj *message) {
|
int pubsubPublishMessage(robj *channel, robj *message) {
|
||||||
int receivers = 0;
|
int receivers = 0;
|
||||||
struct dictEntry *de;
|
dictEntry *de;
|
||||||
listNode *ln;
|
listNode *ln;
|
||||||
listIter li;
|
listIter li;
|
||||||
|
|
||||||
|
@ -688,7 +688,7 @@ void updateDictResizePolicy(void) {
|
|||||||
*
|
*
|
||||||
* The parameter 'now' is the current time in milliseconds as is passed
|
* The parameter 'now' is the current time in milliseconds as is passed
|
||||||
* to the function to avoid too many gettimeofday() syscalls. */
|
* to the function to avoid too many gettimeofday() syscalls. */
|
||||||
int activeExpireCycleTryExpire(redisDb *db, struct dictEntry *de, long long now) {
|
int activeExpireCycleTryExpire(redisDb *db, dictEntry *de, long long now) {
|
||||||
long long t = dictGetSignedIntegerVal(de);
|
long long t = dictGetSignedIntegerVal(de);
|
||||||
if (now > t) {
|
if (now > t) {
|
||||||
sds key = dictGetKey(de);
|
sds key = dictGetKey(de);
|
||||||
@ -2852,7 +2852,7 @@ void evictionPoolPopulate(dict *sampledict, dict *keydict, struct evictionPoolEn
|
|||||||
unsigned long long idle;
|
unsigned long long idle;
|
||||||
sds key;
|
sds key;
|
||||||
robj *o;
|
robj *o;
|
||||||
struct dictEntry *de;
|
dictEntry *de;
|
||||||
|
|
||||||
de = dictGetRandomKey(sampledict);
|
de = dictGetRandomKey(sampledict);
|
||||||
key = dictGetKey(de);
|
key = dictGetKey(de);
|
||||||
@ -2939,7 +2939,7 @@ int freeMemoryIfNeeded(void) {
|
|||||||
for (j = 0; j < server.dbnum; j++) {
|
for (j = 0; j < server.dbnum; j++) {
|
||||||
long bestval = 0; /* just to prevent warning */
|
long bestval = 0; /* just to prevent warning */
|
||||||
sds bestkey = NULL;
|
sds bestkey = NULL;
|
||||||
struct dictEntry *de;
|
dictEntry *de;
|
||||||
redisDb *db = server.db+j;
|
redisDb *db = server.db+j;
|
||||||
dict *dict;
|
dict *dict;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user