1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

When wiping a database, clear the delete_queue.

(This used to be ctdb commit 731a6011ce4a1301f86eacb039955745f2b5d866)
This commit is contained in:
Michael Adam 2010-12-17 02:22:02 +01:00
parent 6a1cfe82f1
commit a81f740f3d

View File

@ -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;
}