From a376ba8b3496823f11d1a7d3720e6c7a5ed4c0f8 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 19 Jul 2016 16:30:26 +1000 Subject: [PATCH] ctdb-vacuum: Do not use freeze_mode outside freeze code If the database is not frozen and recovery mode is not active, then vacuuming can continue. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/server/ctdb_vacuum.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index f5361293546..174ccb23309 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -1445,12 +1445,10 @@ static void ctdb_vacuum_event(struct tevent_context *ev, /* we don't vacuum if we are in recovery mode, or db frozen */ if (ctdb->recovery_mode == CTDB_RECOVERY_ACTIVE || - ctdb->freeze_mode[ctdb_db->priority] != CTDB_FREEZE_NONE) { + ctdb_db_frozen(ctdb_db)) { DEBUG(DEBUG_INFO, ("Not vacuuming %s (%s)\n", ctdb_db->db_name, - ctdb->recovery_mode == CTDB_RECOVERY_ACTIVE ? "in recovery" - : ctdb->freeze_mode[ctdb_db->priority] == CTDB_FREEZE_PENDING - ? "freeze pending" - : "frozen")); + ctdb->recovery_mode == CTDB_RECOVERY_ACTIVE ? + "in recovery" : "frozen")); tevent_add_timer(ctdb->ev, vacuum_handle, timeval_current_ofs(get_vacuum_interval(ctdb_db), 0), ctdb_vacuum_event, vacuum_handle);