The branch, 2.5 has been updated
       via  c632c6a6a97768683d25f7481ff8002961d2052a (commit)
       via  c844a8281e757f89b282095bb2f51d50a9ceaa9e (commit)
      from  81aa6036ea3db32045926ffe3879a139b71f364e (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=2.5


- Log -----------------------------------------------------------------
commit c632c6a6a97768683d25f7481ff8002961d2052a
Author: Michael Adam <ob...@samba.org>
Date:   Mon Feb 10 02:44:56 2014 +0100

    vacuum: move retrieval of freelist to after vacuum run
    
    The fast vacuum run may have increased the freelist size.
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Amitay Isaacs <ami...@gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <ami...@samba.org>
    Autobuild-Date(master): Fri Feb 14 03:15:30 CET 2014 on sn-devel-104
    
    (Imported from commit 0535f73c3abdcd77cb3f5e9f81641fa2a4e1764b)

commit c844a8281e757f89b282095bb2f51d50a9ceaa9e
Author: Michael Adam <ob...@samba.org>
Date:   Thu Feb 13 16:44:04 2014 +0100

    vacuum: fix debug message typo in add_record_to_delete_list()
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Amitay Isaacs <ami...@gmail.com>
    
    (Imported from commit bd474985b1db572cb08eff39b25ecae2b9d0dea8)

-----------------------------------------------------------------------

Summary of changes:
 server/ctdb_vacuum.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_vacuum.c b/server/ctdb_vacuum.c
index d07afd4..22603b8 100644
--- a/server/ctdb_vacuum.c
+++ b/server/ctdb_vacuum.c
@@ -147,7 +147,7 @@ static int add_record_to_delete_list(struct vacuum_data 
*vdata, TDB_DATA key,
        hash = ctdb_hash(&key);
 
        if (trbt_lookup32(vdata->delete_list, hash)) {
-               DEBUG(DEBUG_INFO, (__location__ " Hash collission when 
vacuuming, skipping this record.\n"));
+               DEBUG(DEBUG_INFO, (__location__ " Hash collision when 
vacuuming, skipping this record.\n"));
                return 0;
        }
 
@@ -1431,12 +1431,6 @@ static int ctdb_vacuum_and_repack_db(struct 
ctdb_db_context *ctdb_db,
        int freelist_size;
        struct vacuum_data *vdata;
 
-       freelist_size = tdb_freelist_size(ctdb_db->ltdb->tdb);
-       if (freelist_size == -1) {
-               DEBUG(DEBUG_ERR,(__location__ " Failed to get freelist size for 
'%s'\n", name));
-               return -1;
-       }
-
        vdata = talloc_zero(mem_ctx, struct vacuum_data);
        if (vdata == NULL) {
                DEBUG(DEBUG_ERR,(__location__ " Out of memory\n"));
@@ -1463,6 +1457,13 @@ static int ctdb_vacuum_and_repack_db(struct 
ctdb_db_context *ctdb_db,
                DEBUG(DEBUG_ERR,(__location__ " Failed to vacuum '%s'\n", 
name));
        }
 
+       freelist_size = tdb_freelist_size(ctdb_db->ltdb->tdb);
+       if (freelist_size == -1) {
+               DEBUG(DEBUG_ERR,(__location__ " Failed to get freelist size for 
'%s'\n", name));
+               talloc_free(vdata);
+               return -1;
+       }
+
        /*
         * decide if a repack is necessary
         */


-- 
CTDB repository

Reply via email to