From: Amitay Isaacs Date: Mon, 14 Apr 2014 04:53:25 +0000 (+1000) Subject: ctdb-vacuum: Do not delete VACUUM MIGRATED records immediately X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=257311e337065f089df688cbf261d2577949203d;p=obnox%2Fsamba%2Fsamba-obnox.git ctdb-vacuum: Do not delete VACUUM MIGRATED records immediately Such records should be processed by the local vacuuming daemon to ensure that all the remote copies have been deleted first. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c index 8fb2bc7ce91..9ac2217a34a 100644 --- a/ctdb/server/ctdb_ltdb_server.c +++ b/ctdb/server/ctdb_ltdb_server.c @@ -115,6 +115,11 @@ static int ctdb_ltdb_store_server(struct ctdb_db_context *ctdb_db, * fails. So storing the empty record makes sure that we do not * need to change the client code. */ + if ((header->flags & CTDB_REC_FLAG_VACUUM_MIGRATED) && + (ctdb_db->ctdb->pnn == header->dmaster)) { + keep = true; + schedule_for_deletion = true; + } if (!(header->flags & CTDB_REC_FLAG_VACUUM_MIGRATED)) { keep = true; } else if (ctdb_db->ctdb->pnn != header->dmaster) {