This ensures that whenever databases are frozen either via sending
control or by calling ctdb_start_freeze(), the action is logged.
Since ctdb_control_freeze() calls ctdb_start_freeze(), move logging of
message in early return condition if databases are already frozen.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
478e24bceda3fedfba54ccb48faa115df726b819)
return 0;
}
+ DEBUG(DEBUG_ERR, ("Freeze priority %u\n", priority));
+
/* Stop any vacuuming going on: we don't want to wait. */
ctdb_stop_vacuuming(ctdb);
priority = (uint32_t)c->srvid;
- DEBUG(DEBUG_ERR, ("Freeze priority %u\n", priority));
-
if (priority == 0) {
DEBUG(DEBUG_ERR,("Freeze priority 0 requested, remapping to priority 1\n"));
priority = 1;
}
if (ctdb->freeze_mode[priority] == CTDB_FREEZE_FROZEN) {
+ DEBUG(DEBUG_ERR, ("Freeze priority %u\n", priority));
/* we're already frozen */
return 0;
}