summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-04-12 11:06:44 +0530
committerVijay Bellur <vbellur@redhat.com>2013-05-31 05:27:36 -0700
commit39ae62c39662a37fef9d0809438482ce441a98e0 (patch)
tree7dc8ec22f1be9cf07aa6281daeefda1252e12d0f /xlators/protocol/server/src/server.c
parentc9bf5e6d2897de488967f5d736a5b9898b3deb94 (diff)
protocol/server: Change logs to give more info on disconnects
Change-Id: I8304a12df417be164c564e0696f72c3334f21569 BUG: 952138 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4824 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server.c')
-rw-r--r--xlators/protocol/server/src/server.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 7aafbdf0a59..63e3ce91891 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -121,6 +121,7 @@ server_submit_reply (call_frame_t *frame, rpcsvc_request_t *req, void *arg,
char new_iobref = 0;
server_connection_t *conn = NULL;
gf_boolean_t lk_heal = _gf_false;
+ glusterfs_fop_t fop = GF_FOP_NULL;
GF_VALIDATE_OR_GOTO ("server", req, ret);
@@ -164,14 +165,23 @@ server_submit_reply (call_frame_t *frame, rpcsvc_request_t *req, void *arg,
*/
iobuf_unref (iob);
if (ret == -1) {
- gf_log_callingfn ("", GF_LOG_ERROR, "Reply submission failed");
if (frame && conn && !lk_heal) {
+ fop = frame->root->op;
+ if ((GF_FOP_NULL < fop) &&
+ (fop < GF_FOP_MAXVALUE)) {
+ pthread_mutex_lock (&conn->lock);
+ {
+ conn->rsp_failure_fops[fop]++;
+ }
+ pthread_mutex_unlock (&conn->lock);
+ }
server_connection_cleanup (frame->this, conn,
INTERNAL_LOCKS | POSIX_LOCKS);
} else {
+ gf_log_callingfn ("", GF_LOG_ERROR,
+ "Reply submission failed");
/* TODO: Failure of open(dir), create, inodelk, entrylk
or lk fops send failure must be handled specially. */
- ;
}
goto ret;
}
@@ -759,7 +769,8 @@ server_rpc_notify (rpcsvc_t *rpc, void *xl, rpcsvc_event_t event,
break;
gf_log (this->name, GF_LOG_INFO, "disconnecting connection"
- "from %s", conn->id);
+ " from %s, Number of pending operations: %"PRIu64,
+ conn->id, conn->ref);
/* If lock self heal is off, then destroy the
conn object, else register a grace timer event */