summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2009-08-04 19:43:31 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-08-17 14:37:42 -0700
commit862cbb38375f0176582b06019ba406818d236828 (patch)
tree9e3e409868e71a9b7e54f25f7c555558563e0f01
parenta55616242a4f883a864ac03b5282a12c6b8da03e (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
-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 86c8be962..220f5b3b4 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);