You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
every time test flexkvs, failed at starting
server will close connection right now when recv, maybe the newest test code not pushed to github
when server recv data from connection, the max msg size is 128, but for request body, it need sizeof(*req) + ntohl(req->request.bodylen) at least
staticinlineintconn_recv(ssctx_tsc, intepfd, structconnection*c)
{
ssize_tres;
/* read until request is complete (or no more data) */do {
res=ss_read(sc, c->fd, c->rx_buf+c->rx_len, MAX_MSGSIZE-c->rx_len);
if (res==0) {
fprintf(stderr, "Closing connection on EOF error: %d count: %d\n", errno, MAX_MSGSIZE-c->rx_len);
conn_close(sc, c);
return-1;
} elseif (res<0&&errno==EAGAIN) {
/* request is not complete yet */conn_upepoll(sc, epfd, c, 0);
return1;
} elseif (res<0) {
perror("Closing connection on read error");
conn_close(sc, c);
return-1;
}
c->rx_len+=res;
} while (!conn_req_iscomp(c));
return0;
}
staticinlineintconn_req_iscomp(structconnection*c)
{
protocol_binary_request_header*req=
(protocol_binary_request_header*) (c->rx_buf+c->rx_off);
uint16_tavail=c->rx_len-c->rx_off;
if (avail<sizeof(*req)) {
return0;
}
printf("---Function: %s ---line: %d---avail: %d bodylen: %d\n", __FUNCTION__, __LINE__,avail, ntohl(req->request.bodylen));
if (avail<sizeof(*req) +ntohl(req->request.bodylen)) {
return0;
}
return1;
}
The text was updated successfully, but these errors were encountered:
I guess flexkvs works, I don't know if the problem is related to the TEST itself or not. I had an issue in running the flexkvs client. Eventually, we figured to started the client with a message size argument in the command line.
Sorry missed this. Yeah this is just a matter of bad defaults. The kvs-bench client defaults to a value size of 1K (see here) but flexkvs defaults to the max message size of 128B (for header + key + value, see here). Haven't caught this because I'm always running with explicit parameters. Two options: if you want large values, increase MAX_MSGSIZE, otherwise explicitly set an appropriate value size on the client with -v. I'll make a note to change the default when I get the chance.
every time test flexkvs, failed at starting
server will close connection right now when recv, maybe the newest test code not pushed to github
when server recv data from connection, the max msg size is 128, but for request body, it need sizeof(*req) + ntohl(req->request.bodylen) at least
The text was updated successfully, but these errors were encountered: