Skip to content
Snippets Groups Projects
Commit c939b538 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

iproto: don't use iproto_port for single-tuple response

parent 1d979029
No related branches found
No related tags found
No related merge requests found
...@@ -654,16 +654,18 @@ tx_process_msg(struct cmsg *m) ...@@ -654,16 +654,18 @@ tx_process_msg(struct cmsg *m)
case IPROTO_UPDATE: case IPROTO_UPDATE:
case IPROTO_DELETE: case IPROTO_DELETE:
case IPROTO_UPSERT: case IPROTO_UPSERT:
{
assert(msg->request.type == msg->header.type); assert(msg->request.type == msg->header.type);
struct iproto_port port;
iproto_port_init(&port, out, msg->header.sync);
struct tuple *tuple; struct tuple *tuple;
if (box_process1(&msg->request, &tuple) < 0) if (box_process1(&msg->request, &tuple) < 0)
throw (Exception *) box_error_last(); throw (Exception *) box_error_last();
struct obuf_svp svp = iproto_prepare_select(out);
if (tuple) if (tuple)
port_add_tuple(&port.base, tuple); tuple_to_obuf(tuple, out);
port_eof(&port.base); iproto_reply_select(out, &svp, msg->header.sync,
tuple != 0);
break; break;
}
case IPROTO_CALL: case IPROTO_CALL:
assert(msg->request.type == msg->header.type); assert(msg->request.type == msg->header.type);
rmean_collect(rmean_box, msg->request.type, 1); rmean_collect(rmean_box, msg->request.type, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment