summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_vacuum.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/server/ctdb_vacuum.c')
-rw-r--r--ctdb/server/ctdb_vacuum.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c
index 964eeabe74..215811560c 100644
--- a/ctdb/server/ctdb_vacuum.c
+++ b/ctdb/server/ctdb_vacuum.c
@@ -145,7 +145,7 @@ static int vacuum_traverse(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data,
struct ctdb_db_context *ctdb_db = vdata->ctdb_db;
uint32_t lmaster;
struct ctdb_ltdb_header *hdr;
- int res;
+ int res = 0;
lmaster = ctdb_lmaster(ctdb, &key);
if (lmaster >= ctdb->num_nodes) {
@@ -204,11 +204,14 @@ static int vacuum_traverse(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data,
vdata->delete_count++;
}
+ } else {
+ /*
+ * We are not lmaster.
+ * Add the record to the blob ready to send to the nodes.
+ */
+ res = add_record_to_vacuum_fetch_list(vdata, key);
}
- /* add the record to the blob ready to send to the nodes */
- res = add_record_to_vacuum_fetch_list(vdata, key);
-
return res;
}