ctdb-daemon: Delete empty records from persistent database
authorAmitay Isaacs <amitay@gmail.com>
Thu, 9 Mar 2017 04:53:21 +0000 (15:53 +1100)
committerMartin Schwenke <martins@samba.org>
Sat, 17 Jun 2017 10:36:16 +0000 (12:36 +0200)
Persistent databases are now always recovered by sequence number.  So
there is no need to keep the empty records in the database since they
will never be recovered record-by-record using RSN.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/server/ctdb_ltdb_server.c

index 677078be6a87e3d3b29b9b56c4be2b32e02d274c..f5a65f39de02720dc2fd328a8fbb55464dfa3cae 100644 (file)
@@ -104,8 +104,6 @@ static int ctdb_ltdb_store_server(struct ctdb_db_context *ctdb_db,
                keep = true;
        } else if (header->flags & CTDB_REC_RO_FLAGS) {
                keep = true;
-       } else if (ctdb_db->persistent) {
-               keep = true;
        } else if (header->flags & CTDB_REC_FLAG_AUTOMATIC) {
                /*
                 * The record is not created by the client but