diff options
author | Michael Adam <obnox@samba.org> | 2010-12-20 16:41:13 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-03-14 13:35:46 +0100 |
commit | d331d7a7b31ee162bc0ac6aff91eea73537942cb (patch) | |
tree | b0de0a94b6117488ab70e2c1e3b1b13408e63471 | |
parent | 3d7bfc7a3ea03d3228cdec326e11aa491a8f574d (diff) | |
download | samba-d331d7a7b31ee162bc0ac6aff91eea73537942cb.tar.gz samba-d331d7a7b31ee162bc0ac6aff91eea73537942cb.tar.xz samba-d331d7a7b31ee162bc0ac6aff91eea73537942cb.zip |
vacuum: skip adding records to list of records to send to lmaster on lmaster
This list is skipped afterwards when the lists are processed.
(This used to be ctdb commit e99834c1a2eea60f7f974c0689ae0a65cfe178ff)
-rw-r--r-- | ctdb/server/ctdb_vacuum.c | 11 |
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; } |