pid_t child_pid;
enum vacuum_child_status status;
struct timeval start_time;
+ bool scheduled;
};
struct ctdb_vacuum_handle {
ctdb->vacuumer = NULL;
- tevent_add_timer(ctdb->ev, child_ctx->vacuum_handle,
- timeval_current_ofs(get_vacuum_interval(ctdb_db), 0),
- ctdb_vacuum_event, child_ctx->vacuum_handle);
+ if (child_ctx->scheduled) {
+ tevent_add_timer(
+ ctdb->ev,
+ child_ctx->vacuum_handle,
+ timeval_current_ofs(get_vacuum_interval(ctdb_db), 0),
+ ctdb_vacuum_event,
+ child_ctx->vacuum_handle);
+ }
return 0;
}
*/
static int vacuum_db_child(TALLOC_CTX *mem_ctx,
struct ctdb_db_context *ctdb_db,
+ bool scheduled,
bool full_vacuum_run,
struct ctdb_vacuum_child_context **out)
{
close(child_ctx->fd[1]);
child_ctx->status = VACUUM_RUNNING;
+ child_ctx->scheduled = scheduled;
child_ctx->start_time = timeval_current();
ctdb->vacuumer = child_ctx;
ret = vacuum_db_child(vacuum_handle,
ctdb_db,
+ true,
full_vacuum_run,
&child_ctx);