From dbb1958284657f26a868705e5f9612bc377fd5e0 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Thu, 6 Nov 2014 09:33:50 +1100 Subject: [PATCH] ctdb-vacuum: Use non-blocking lock when traversing delete tree This avoids vacuuming getting in the way of ctdb daemon to process record requests. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/server/ctdb_vacuum.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index 892dc07d15d..d678ff98ab3 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -317,12 +317,8 @@ static int delete_marshall_traverse_first(void *param, void *data) uint32_t hash = ctdb_hash(&(dd->key)); int res; - res = tdb_chainlock(ctdb_db->ltdb->tdb, dd->key); + res = tdb_chainlock_nonblock(ctdb_db->ltdb->tdb, dd->key); if (res != 0) { - DEBUG(DEBUG_ERR, - (__location__ " Error getting chainlock on record with " - "key hash [0x%08x] on database db[%s].\n", - hash, ctdb_db->db_name)); recs->vdata->count.delete_list.skipped++; recs->vdata->count.delete_list.left--; talloc_free(dd); -- 2.11.4.GIT