summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2019-09-30 16:34:35 +1000
committerKarolin Seeger <kseeger@samba.org>2019-10-16 12:16:21 +0000
commit6024163e177fd36fcd4270d439553e4410b1ae29 (patch)
treeb2acbdd2ae38c02d34c6b733a79b94bcff1d568b /ctdb
parentc788ff56bae20dad25391698876343801b4afbf2 (diff)
downloadsamba-6024163e177fd36fcd4270d439553e4410b1ae29.tar.gz
ctdb-vacuum: Process all records not deleted on a remote node
This currently skips the last record. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14147 RN: Avoid potential data loss during recovery after vacuuming error Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> (cherry picked from commit 33f1c9d9654fbdcb99c23f9d23c4bbe2cc596b98)
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_vacuum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c
index 2194b7f4da7..fa43eaa8e67 100644
--- a/ctdb/server/ctdb_vacuum.c
+++ b/ctdb/server/ctdb_vacuum.c
@@ -814,7 +814,7 @@ static void ctdb_process_delete_list(struct ctdb_db_context *ctdb_db,
*/
records = (struct ctdb_marshall_buffer *)outdata.dptr;
rec = (struct ctdb_rec_data_old *)&records->data[0];
- while (records->count-- > 1) {
+ while (records->count-- > 0) {
TDB_DATA reckey, recdata;
struct ctdb_ltdb_header *rechdr;
struct delete_record_data *dd;