summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-protocol.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2009-08-04 19:41:13 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-08-17 14:38:10 -0700
commit63218f025ee679babcf0ed916f9e43fc58d91aee (patch)
treec284bcd61841481fdb03254b28fa380dbc6f4ef8 /xlators/protocol/server/src/server-protocol.c
parent33c5ddbdac409dcb31fee4f26608b27ed1237949 (diff)
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 <avati@dev.gluster.com> 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
Diffstat (limited to 'xlators/protocol/server/src/server-protocol.c')
-rw-r--r--xlators/protocol/server/src/server-protocol.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index 2178fcb..92ef6cf 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);