summaryrefslogtreecommitdiff
path: root/ctdb/server/ctdb_freeze.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-07-21 12:29:55 +0930
committerRusty Russell <rusty@rustcorp.com.au>2010-08-18 10:54:28 +0930
commitaf55c910a4cbf7be87db7f6e7b17674d17df2d26 (patch)
tree6c9486906d2238bf5006185523f3539896d8507d /ctdb/server/ctdb_freeze.c
parenta79168f587bc49868a804c22d4c0d32a6520b7c8 (diff)
downloadsamba-af55c910a4cbf7be87db7f6e7b17674d17df2d26.tar.gz
freeze: abort vacuuming when we're going to freeze.
There are some reports of freeze timeouts, and it looks like vacuuming might be the culprit. So we add code to tell them to abort when a freeze is going on. (This is based on the 1.0.112 branch version 517f05e42f, but far simpler since tdb is now robust against processes being killed during transaction commit) CQ:S1018154 & S1018349 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit f5d7dc679501e607c2c83a248a89d3cada9df146)
Diffstat (limited to 'ctdb/server/ctdb_freeze.c')
-rw-r--r--ctdb/server/ctdb_freeze.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_freeze.c b/ctdb/server/ctdb_freeze.c
index e641ef3ae68..4e977589e1e 100644
--- a/ctdb/server/ctdb_freeze.c
+++ b/ctdb/server/ctdb_freeze.c
@@ -272,6 +272,9 @@ int ctdb_start_freeze(struct ctdb_context *ctdb, uint32_t priority)
return 0;
}
+ /* Stop any vacuuming going on: we don't want to wait. */
+ ctdb_stop_vacuuming(ctdb);
+
/* if there isn't a freeze lock child then create one */
if (ctdb->freeze_handles[priority] == NULL) {
ctdb->freeze_handles[priority] = ctdb_freeze_lock(ctdb, priority);