Skip to content
Snippets Groups Projects
Commit 2ba101f0 authored by ocelot-inc's avatar ocelot-inc
Browse files

Merge branch 'master' of https://github.com/tarantool/tarantool

parents 63e5f533 48317c89
No related merge requests found
......@@ -522,7 +522,8 @@ iproto_connection_on_input(ev_loop *loop, struct ev_io *watcher,
static inline struct iobuf *
iproto_connection_output_iobuf(struct iproto_connection *con)
{
if (obuf_size(&con->iobuf[1]->out))
if (obuf_size(&con->iobuf[1]->out) &&
obuf_size(&con->iobuf[1]->out) > con->write_pos.size)
return con->iobuf[1];
/*
* Don't try to write from a newer buffer if an older one
......@@ -531,7 +532,8 @@ iproto_connection_output_iobuf(struct iproto_connection *con)
* pieces of replies from both buffers.
*/
if (ibuf_size(&con->iobuf[1]->in) == 0 &&
obuf_size(&con->iobuf[0]->out))
obuf_size(&con->iobuf[0]->out) &&
obuf_size(&con->iobuf[0]->out) > con->write_pos.size)
return con->iobuf[0];
return NULL;
}
......
......@@ -239,6 +239,17 @@ lbox_fiber_statof(struct fiber *f, void *cb_ctx)
lua_pushnumber(L, f->csw);
lua_settable(L, -3);
lua_pushliteral(L, "memory");
lua_newtable(L);
lua_pushstring(L, "used");
lua_pushnumber(L, region_used(&f->gc));
lua_settable(L, -3);
lua_pushstring(L, "total");
lua_pushnumber(L, region_total(&f->gc) + f->coro.stack_size +
sizeof(struct fiber));
lua_settable(L, -3);
lua_settable(L, -3);
#ifdef ENABLE_BACKTRACE
lua_pushstring(L, "backtrace");
lua_newtable(L);
......
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