diff options
author | Michael Adam <obnox@samba.org> | 2010-12-17 01:53:25 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-03-14 13:35:45 +0100 |
commit | 6a1cfe82f1b2d55ffd9e00f2a0731eef653ee76e (patch) | |
tree | 921360d9142e2290b04cbcb2cdee8909f936e16d | |
parent | b9c9b989ceb00a6f4341f66a90454b0d514f45aa (diff) | |
download | samba-6a1cfe82f1b2d55ffd9e00f2a0731eef653ee76e.tar.gz samba-6a1cfe82f1b2d55ffd9e00f2a0731eef653ee76e.tar.xz samba-6a1cfe82f1b2d55ffd9e00f2a0731eef653ee76e.zip |
vaccum: clear the fast-path vacuuming delete_queue after creating the vacuuming child.
Maybe we should keep a copy for the case that the vacuuming fails?
(This used to be ctdb commit f19fe5b45748a6998c6950a5b1db7ec2c4468c1c)
-rw-r--r-- | ctdb/server/ctdb_vacuum.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index e5b3cd5e22..3639547738 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -908,6 +908,17 @@ ctdb_vacuum_event(struct event_context *ev, struct timed_event *te, DLIST_ADD(ctdb->vacuumers, child_ctx); talloc_set_destructor(child_ctx, vacuum_child_destructor); + /* + * Clear the fastpath vacuuming list in the parent. + */ + talloc_free(ctdb_db->delete_queue); + ctdb_db->delete_queue = trbt_create(ctdb_db, 0); + if (ctdb_db->delete_queue == NULL) { + /* fatal here? ... */ + ctdb_fatal(ctdb, "Out of memory when re-creating vacuum tree " + "in parent context. Shutting down\n"); + } + event_add_timed(ctdb->ev, child_ctx, timeval_current_ofs(ctdb->tunable.vacuum_max_run_time, 0), vacuum_child_timeout, child_ctx); |