mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
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 <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
f03d39df5a
commit
a376ba8b34
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user