From 63218f025ee679babcf0ed916f9e43fc58d91aee Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 4 Aug 2009 19:41:13 +0000 Subject: added log message when server fails to send the reply frame As of now, if a frame submit fails on server, there are no logs, and clients will have missing frames (which leads to 'hangs'). Supporting situation like this very tricky without proper log messages. As a step to make our log message lean and meaningful, this log is important. Signed-off-by: Anand V. Avati BUG: 190 (missing frames due to larger reply message size.. (ib-verbs)) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=190 --- xlators/protocol/server/src/server-protocol.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'xlators/protocol/server') diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c index 2178fcbbb..92ef6cfac 100644 --- a/xlators/protocol/server/src/server-protocol.c +++ b/xlators/protocol/server/src/server-protocol.c @@ -51,6 +51,7 @@ protocol_server_reply (call_frame_t *frame, int type, int op, server_state_t *state = NULL; xlator_t *bound_xl = NULL; transport_t *trans = NULL; + int ret = 0; bound_xl = BOUND_XL (frame); state = CALL_STATE (frame); @@ -60,10 +61,13 @@ protocol_server_reply (call_frame_t *frame, int type, int op, hdr->type = hton32 (type); hdr->op = hton32 (op); - transport_submit (trans, (char *)hdr, hdrlen, vector, count, iobref); - /* TODO: If transport submit fails, there is no reply sent to client, - * its bailed out as of now.. loggically, only this frame should fail. - */ + ret = transport_submit (trans, (char *)hdr, hdrlen, vector, + count, iobref); + if (ret < 0) { + gf_log ("protocol/server", GF_LOG_ERROR, + "frame %"PRId64": failed to submit. op= %d, type= %d", + frame->root->unique, op, type); + } STACK_DESTROY (frame->root); -- cgit