diff --git a/src/cluster.c b/src/cluster.c index e1c12c60e806d8e78b375e43544e78facaada656..f7d45b563ee904430f530f5056449a9426aa9f8e 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1534,7 +1534,7 @@ void clusterCommand(redisClient *c) { if (server.cluster->slots[slot] == server.cluster->myself && n != server.cluster->myself) { - if (CountKeysInSlot(slot) != 0) { + if (countKeysInSlot(slot) != 0) { addReplyErrorFormat(c, "Can't assign hashslot %d to a different node while I still hold keys for this hash slot.", slot); return; } @@ -1619,7 +1619,7 @@ void clusterCommand(redisClient *c) { } keys = zmalloc(sizeof(robj*)*maxkeys); - numkeys = GetKeysInSlot(slot, keys, maxkeys); + numkeys = getKeysInSlot(slot, keys, maxkeys); addReplyMultiBulkLen(c,numkeys); for (j = 0; j < numkeys; j++) addReplyBulk(c,keys[j]); zfree(keys); diff --git a/src/db.c b/src/db.c index d4d24b7ae0615fae4088ee2f6d180698620d8403..bcfe9b5d5d51f74ed0c2902f2cf064fb4b381049 100644 --- a/src/db.c +++ b/src/db.c @@ -763,7 +763,7 @@ void slotToKeyFlush(void) { server.cluster->slots_to_keys = zslCreate(); } -unsigned int GetKeysInSlot(unsigned int hashslot, robj **keys, unsigned int count) { +unsigned int getKeysInSlot(unsigned int hashslot, robj **keys, unsigned int count) { zskiplistNode *n; zrangespec range; int j = 0; @@ -779,7 +779,7 @@ unsigned int GetKeysInSlot(unsigned int hashslot, robj **keys, unsigned int coun return j; } -unsigned int CountKeysInSlot(unsigned int hashslot) { +unsigned int countKeysInSlot(unsigned int hashslot) { zskiplistNode *n; zrangespec range; int j = 0; diff --git a/src/redis.h b/src/redis.h index b2788c2530873b930afa5dd16750fdf92a84c5da..4006aaa6f815fe16d7acc911fd1930b1fa656fd0 100644 --- a/src/redis.h +++ b/src/redis.h @@ -1226,8 +1226,8 @@ long long emptyDb(); int selectDb(redisClient *c, int id); void signalModifiedKey(redisDb *db, robj *key); void signalFlushedDb(int dbid); -unsigned int GetKeysInSlot(unsigned int hashslot, robj **keys, unsigned int count); -unsigned int CountKeysInSlot(unsigned int hashslot); +unsigned int getKeysInSlot(unsigned int hashslot, robj **keys, unsigned int count); +unsigned int countKeysInSlot(unsigned int hashslot); int verifyClusterConfigWithData(void); /* API to get key arguments from commands */