提交 d2154254 编写于 作者: A antirez

Cluster: fix case for getKeysInSlot() and countKeysInSlot().

Redis functions start in low case. A few functions about cluster were
capitalized the wrong way.
上级 c2eb4a60
......@@ -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);
......
......@@ -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;
......
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册