diff options
author | Michael Adam <obnox@samba.org> | 2011-12-22 15:46:49 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-12-23 17:39:11 +0100 |
commit | d29b2bd8bd8208a21f68fa032cf9897927bf9049 (patch) | |
tree | bd218735e617550f7254fc510e6130e5ac09698c | |
parent | 7a79e77c1f2baf36d9a8bf57205ec102be93670d (diff) | |
download | samba-d29b2bd8bd8208a21f68fa032cf9897927bf9049.tar.gz samba-d29b2bd8bd8208a21f68fa032cf9897927bf9049.tar.xz samba-d29b2bd8bd8208a21f68fa032cf9897927bf9049.zip |
vacuum: add statistics output for processing of the delete list
(This used to be ctdb commit bec2ff46402b6d90521c75e8d46b9f6f2f47239a)
-rw-r--r-- | ctdb/server/ctdb_vacuum.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index 6a37e675a1..e0c601f142 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -668,6 +668,8 @@ static int ctdb_process_delete_list(struct ctdb_db_context *ctdb_db, int ret, i; struct ctdb_context *ctdb = ctdb_db->ctdb; + vdata->delete_left = vdata->delete_count; + if (vdata->delete_count > 0) { struct delete_records_list *recs; TDB_DATA indata, outdata; @@ -676,8 +678,6 @@ static int ctdb_process_delete_list(struct ctdb_db_context *ctdb_db, uint32_t *active_nodes; int num_active_nodes; - vdata->delete_left = vdata->delete_count; - recs = talloc_zero(vdata, struct delete_records_list); if (recs == NULL) { DEBUG(DEBUG_ERR,(__location__ " Out of memory\n")); @@ -807,6 +807,26 @@ static int ctdb_process_delete_list(struct ctdb_db_context *ctdb_db, delete_record_traverse, vdata); } + if (vdata->delete_count > 0) { + DEBUG(DEBUG_INFO, + (__location__ + " vacuum delete list statistics: " + "db[%s] " + "coll[%u] " + "rem.err[%u] " + "loc.err[%u] " + "skip[%u] " + "del[%u] " + "left[%u]\n", + ctdb_db->db_name, + (unsigned)vdata->delete_count, + (unsigned)vdata->delete_remote_error, + (unsigned)vdata->delete_local_error, + (unsigned)vdata->delete_skipped, + (unsigned)vdata->delete_deleted, + (unsigned)vdata->delete_left)); + } + return 0; } |