diff options
author | Michael Adam <obnox@samba.org> | 2011-12-23 17:22:46 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-12-23 17:39:13 +0100 |
commit | ca7d2bf63a9f56adc105b5e3218864bedb54b7aa (patch) | |
tree | 38f4280515012c931db8fd58b9f50b3c30b8a633 | |
parent | 8348c431f280dc0843bdf685fc006a765c1c7839 (diff) | |
download | samba-ca7d2bf63a9f56adc105b5e3218864bedb54b7aa.tar.gz samba-ca7d2bf63a9f56adc105b5e3218864bedb54b7aa.tar.xz samba-ca7d2bf63a9f56adc105b5e3218864bedb54b7aa.zip |
vacuum: improve logging in delete_record_traverse()
(This used to be ctdb commit 40ca781b3305d9f0bfee5b109d4eefde461a3f13)
-rw-r--r-- | ctdb/server/ctdb_vacuum.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index d40d17be04..397a55ce91 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -459,10 +459,14 @@ static int delete_record_traverse(void *param, void *data) TDB_DATA tdb_data; uint32_t lmaster; bool deleted = false; + uint32_t hash = ctdb_hash(&(dd->key)); res = tdb_chainlock(ctdb_db->ltdb->tdb, dd->key); if (res != 0) { - DEBUG(DEBUG_ERR, (__location__ " Error getting chainlock.\n")); + DEBUG(DEBUG_ERR, + (__location__ " Error getting chainlock on record with " + "key hash [0x%08x] on database db[%s].\n", + hash, ctdb_db->db_name)); vdata->delete_local_error++; return 0; } @@ -515,14 +519,19 @@ static int delete_record_traverse(void *param, void *data) if (res != 0) { DEBUG(DEBUG_ERR, - (__location__ " Error deleting record from local " - "data base.\n")); + (__location__ " Error deleting record with key hash " + "[0x%08x] from local data base db[%s].\n", + hash, ctdb_db->db_name)); vdata->delete_local_error++; goto done; } deleted = true; + DEBUG(DEBUG_DEBUG, + (__location__ " Deleted record with key hash [0x%08x] from " + "local data base db[%s].\n", hash, ctdb_db->db_name)); + done: if (tdb_data.dptr != NULL) { free(tdb_data.dptr); |