]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-vacuum: Process all records not deleted on a remote node
authorAmitay Isaacs <amitay@gmail.com>
Mon, 30 Sep 2019 06:34:35 +0000 (16:34 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 4 Oct 2019 05:47:34 +0000 (05:47 +0000)
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>
ctdb/server/ctdb_vacuum.c

index 0c3770267bc3d09a2cc418b2040c584af10a6650..4fd11e3738c462b3de7ac43a0d105a9a200ffcdc 100644 (file)
@@ -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;