From a81f740f3dda9cff343640c5a726db5a0dc5fcd5 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 17 Dec 2010 02:22:02 +0100 Subject: When wiping a database, clear the delete_queue. (This used to be ctdb commit 731a6011ce4a1301f86eacb039955745f2b5d866) --- ctdb/server/ctdb_freeze.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ctdb/server/ctdb_freeze.c b/ctdb/server/ctdb_freeze.c index 86cb5edc12..0f70fd3502 100644 --- a/ctdb/server/ctdb_freeze.c +++ b/ctdb/server/ctdb_freeze.c @@ -25,6 +25,7 @@ #include "../include/ctdb_private.h" #include "lib/util/dlinklist.h" #include "db_wrap.h" +#include "../common/rb_tree.h" static bool later_db(const char *name) { @@ -605,5 +606,15 @@ int32_t ctdb_control_wipe_database(struct ctdb_context *ctdb, TDB_DATA indata) return -1; } + if (!ctdb_db->persistent) { + talloc_free(ctdb_db->delete_queue); + ctdb_db->delete_queue = trbt_create(ctdb_db, 0); + if (ctdb_db->delete_queue == NULL) { + DEBUG(DEBUG_ERR, (__location__ " Failed to re-create " + "the vacuum tree.\n")); + return -1; + } + } + return 0; } -- cgit