struct ctdb_context *ctdb = ctdb_db->ctdb;
struct ctdb_vacuum_child_context *child_ctx;
struct tevent_fd *fde;
+ bool full_vacuum_run = false;
int ret;
/* we don't vacuum if we are in recovery mode, or db frozen */
return;
}
- if (vacuum_handle->fast_path_count > ctdb->tunable.vacuum_fast_path_count) {
+ if (vacuum_handle->fast_path_count >=
+ ctdb->tunable.vacuum_fast_path_count) {
+ if (ctdb->tunable.vacuum_fast_path_count > 0) {
+ full_vacuum_run = true;
+ }
vacuum_handle->fast_path_count = 0;
}
if (child_ctx->child_pid == 0) {
char cc = 0;
- bool full_vacuum_run = false;
close(child_ctx->fd[0]);
DEBUG(DEBUG_INFO,("Vacuuming child process %d for db %s started\n", getpid(), ctdb_db->db_name));
_exit(1);
}
- if ((ctdb->tunable.vacuum_fast_path_count > 0) &&
- (vacuum_handle->fast_path_count == 0))
- {
- full_vacuum_run = true;
- }
cc = ctdb_vacuum_and_repack_db(ctdb_db, full_vacuum_run);
sys_write(child_ctx->fd[1], &cc, 1);