From f5f11e1a05d4d75a7662d6c413a14c4cd18f8ed9 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 12 Sep 2014 10:50:27 +1000 Subject: ctdb-daemon: Decrement pending calls statistics when calls are deferred Deferred calls should not be treated as pending calls since they are re-processed from the beginning. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/server/ctdb_daemon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 46a134c60d..65b7109620 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -653,6 +653,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client, if (ret != 0) { DEBUG(DEBUG_ERR,(__location__ " ctdb_ltdb_unlock() failed with error %d\n", ret)); } + CTDB_DECREMENT_STAT(ctdb, pending_calls); return; } } @@ -685,6 +686,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client, if (ctdb_add_revoke_deferred_call(ctdb, ctdb_db, key, (struct ctdb_req_header *)c, daemon_incoming_packet, client) != 0) { ctdb_fatal(ctdb, "Failed to add deferred call for revoke child"); } + CTDB_DECREMENT_STAT(ctdb, pending_calls); return; } @@ -706,6 +708,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client, ctdb_fatal(ctdb, "Failed to add deferred call for revoke child"); } + CTDB_DECREMENT_STAT(ctdb, pending_calls); return; } -- cgit