1
0
mirror of https://github.com/fluencelabs/redis synced 2025-03-31 23:01:03 +00:00

redis-benchmark hopefully last bug with multi bulk reply fixed

This commit is contained in:
antirez 2009-11-19 18:44:18 +01:00
parent 58cd710344
commit b892cabed4
2 changed files with 3 additions and 3 deletions

@ -365,9 +365,7 @@ static void createMissingClients(client c) {
sdsfree(new->obuf); sdsfree(new->obuf);
new->obuf = sdsdup(c->obuf); new->obuf = sdsdup(c->obuf);
if (config.randomkeys) randomizeClientKey(c); if (config.randomkeys) randomizeClientKey(c);
new->replytype = c->replytype; prepareClientForReply(new,c->replytype);
if (c->replytype == REPLY_BULK)
new->readlen = -1;
} }
} }

@ -1385,6 +1385,7 @@ static void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask)
/* Use writev() if we have enough buffers to send */ /* Use writev() if we have enough buffers to send */
#if 0
if (!server.glueoutputbuf && if (!server.glueoutputbuf &&
listLength(c->reply) > REDIS_WRITEV_THRESHOLD && listLength(c->reply) > REDIS_WRITEV_THRESHOLD &&
!(c->flags & REDIS_MASTER)) !(c->flags & REDIS_MASTER))
@ -1392,6 +1393,7 @@ static void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask)
sendReplyToClientWritev(el, fd, privdata, mask); sendReplyToClientWritev(el, fd, privdata, mask);
return; return;
} }
#endif
while(listLength(c->reply)) { while(listLength(c->reply)) {
if (server.glueoutputbuf && listLength(c->reply) > 1) if (server.glueoutputbuf && listLength(c->reply) > 1)