summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_daemon.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2012-02-08 13:42:30 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2012-02-08 13:42:30 +1100
commit1eafa68f0f3b63dda173d939ed9e4882872b3bea (patch)
tree0a7a2fcedf8b0294caf0faa8f50fdc86dcf4ea63 /ctdb/server/ctdb_daemon.c
parent770bba6718a9a0dc99b0828d17cb047241a1fa5b (diff)
downloadsamba-1eafa68f0f3b63dda173d939ed9e4882872b3bea.tar.gz
samba-1eafa68f0f3b63dda173d939ed9e4882872b3bea.tar.xz
samba-1eafa68f0f3b63dda173d939ed9e4882872b3bea.zip
STATISTICS: add total counts for number of delegations and number of revokes
Everytime we give a delegation to another node we count this as one delegation. If the same record is delegated to several nodes we count one for each node. Everytime a record has all its delegations revoked we count this as one revoke. (This used to be ctdb commit b098bcf8007be63889aaed640a951b0eeaa9d191)
Diffstat (limited to 'ctdb/server/ctdb_daemon.c')
-rw-r--r--ctdb/server/ctdb_daemon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 53f47d67faa..bff91c5fa67 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -690,6 +690,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
if (header.flags & CTDB_REC_RO_REVOKE_COMPLETE) {
header.flags &= ~(CTDB_REC_RO_HAVE_DELEGATIONS|CTDB_REC_RO_HAVE_READONLY|CTDB_REC_RO_REVOKING_READONLY|CTDB_REC_RO_REVOKE_COMPLETE);
+ CTDB_INCREMENT_STAT(ctdb, total_ro_revokes);
if (ctdb_ltdb_store(ctdb_db, key, &header, data) != 0) {
ctdb_fatal(ctdb, "Failed to write header with cleared REVOKE flag");
}