The branch, 1.0.82 has been updated
       via  2423eb06518292b0164426a981636b9d9adbd482 (commit)
       via  c3afe7f0f84faf619ac32a1050b7c8a9712c8a98 (commit)
       via  9fb67bbcc8b4880e29f69aa4862d24bf9c567449 (commit)
       via  27dfcdde9abb765a3b874df2ef00e0ba0f22ee53 (commit)
       via  21b33d7a2b86453b60f8bfc94cc14fe4ef5432eb (commit)
       via  18d7a1533257a4a0ad643f0fd213b82fb6a6dce7 (commit)
      from  d745ecb8d161c7a629676a3b2ab4a2bc826f70b7 (commit)

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


- Log -----------------------------------------------------------------
commit 2423eb06518292b0164426a981636b9d9adbd482
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Tue Jan 12 09:49:45 2010 +1100

    version 1.0.82-19

commit c3afe7f0f84faf619ac32a1050b7c8a9712c8a98
Author: Christian Ambach <christian.amb...@de.ibm.com>
Date:   Tue Dec 8 19:23:19 2009 +0100

    reduce vacuuming lognoise
    
    syslog.h says:
    
    LOG_NOTICE      5    normal but significant condition
    LOG_INFO        6    informational
    
    several vacuuming related logs logged at NOTICE level although I don't see
    any real significance, these are just informational messages for me
    
    Signed-off-by: Christian Ambach <christian.amb...@de.ibm.com>

commit 9fb67bbcc8b4880e29f69aa4862d24bf9c567449
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Tue Nov 24 09:27:22 2009 +1100

    reduce the log level for three vacuuming related log messages (cherry 
picked from commit fbc453733d53359b9eba34a7ca9123237a7ecca5)
    
    Signed-off-by: Christian Ambach <christian.amb...@de.ibm.com>

commit 27dfcdde9abb765a3b874df2ef00e0ba0f22ee53
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Thu Nov 5 16:07:23 2009 +1100

    dont use the pointer after it has been talloc_free()d. (cherry picked from 
commit 1cbf06a126621b3e932925cdad2ef9c009f93d4e)
    
    Signed-off-by: Christian Ambach <christian.amb...@de.ibm.com>

commit 21b33d7a2b86453b60f8bfc94cc14fe4ef5432eb
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Mon Oct 26 09:35:18 2009 +1100

    lower the log level of a debug message (cherry picked from commit 
496dc2e80b714811c6e69dc928deaad61cf603b1)
    
    Signed-off-by: Christian Ambach <christian.amb...@de.ibm.com>

commit 18d7a1533257a4a0ad643f0fd213b82fb6a6dce7
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Tue Oct 20 13:01:15 2009 +1100

    From Wolfgang Mueller
    
    make sure to always create the vactun database and get rid of some annoying 
log messages
    (cherry picked from commit 54f9c314a0354f1039208fe6ac7dc159b6db8750)
    
    Signed-off-by: Christian Ambach <christian.amb...@de.ibm.com>

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

Summary of changes:
 packaging/RPM/ctdb.spec |    4 +++-
 server/ctdb_vacuum.c    |   30 ++++++++++++++----------------
 2 files changed, 17 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index 17e646e..2b852f4 100644
--- a/packaging/RPM/ctdb.spec
+++ b/packaging/RPM/ctdb.spec
@@ -5,7 +5,7 @@ Vendor: Samba Team
 Packager: Samba Team <sa...@samba.org>
 Name: ctdb
 Version: 1.0.82
-Release: 18
+Release: 19
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons
@@ -133,6 +133,8 @@ fi
 %{_libdir}/pkgconfig/ctdb.pc
 
 %changelog
+* Tue Jan 12 2010 : Version 1.0.82-19
+ - Various changes to reduce the loglevels for informational messages
 * Tue Dec 8 2009 : Version 1.0.82-18
  - Remove dodgy talloc fix and replace with correct fix from Rusty.
 * Fri Nov 6 2009 : Version 1.0.82-16
diff --git a/server/ctdb_vacuum.c b/server/ctdb_vacuum.c
index 074acbb..98be294 100644
--- a/server/ctdb_vacuum.c
+++ b/server/ctdb_vacuum.c
@@ -131,7 +131,7 @@ static int vacuum_traverse(struct tdb_context *tdb, 
TDB_DATA key, TDB_DATA data,
 
                hash = ctdb_hash(&key);
                if (trbt_lookup32(vdata->delete_tree, hash)) {
-                       DEBUG(DEBUG_INFO, (__location__ " Hash collission when 
vacuuming, skipping this record.\n"));
+                       DEBUG(DEBUG_DEBUG, (__location__ " Hash collission when 
vacuuming, skipping this record.\n"));
                } 
                else {
                        struct delete_record_data *dd;
@@ -267,7 +267,7 @@ static int ctdb_vacuum_db(struct ctdb_db_context *ctdb_db, 
struct vacuum_data *v
                /* for records where we are not the lmaster, tell the lmaster 
to fetch the record */
                if (ctdb->vnn_map->map[i] != ctdb->pnn) {
                        TDB_DATA data;
-                       DEBUG(DEBUG_NOTICE,("Found %u records for lmaster %u in 
'%s'\n", 
+                       DEBUG(DEBUG_INFO,("Found %u records for lmaster %u in 
'%s'\n", 
                                                                
vdata->list[i]->count, i, name));
 
                        data.dsize = talloc_get_size(vdata->list[i]);
@@ -459,7 +459,7 @@ static int ctdb_repack_tdb(struct tdb_context *tdb, 
TALLOC_CTX *mem_ctx, struct
                return -1;              
        }
 
-       DEBUG(DEBUG_NOTICE,(__location__ " %u records vacuumed\n", 
vdata->vacuumed));
+       DEBUG(DEBUG_INFO,(__location__ " %u records vacuumed\n", 
vdata->vacuumed));
        
        if (vdata->traverse_error) {
                DEBUG(DEBUG_ERR,(__location__ " Error during traversal\n"));
@@ -501,7 +501,7 @@ static int ctdb_repack_tdb(struct tdb_context *tdb, 
TALLOC_CTX *mem_ctx, struct
                DEBUG(DEBUG_ERR,(__location__ " Failed to commit\n"));
                return -1;
        }
-       DEBUG(DEBUG_NOTICE,(__location__ " %u records copied\n", 
vdata->copied));
+       DEBUG(DEBUG_INFO,(__location__ " %u records copied\n", vdata->copied));
 
        return 0;
 }
@@ -524,7 +524,7 @@ static int update_tuning_db(struct ctdb_db_context 
*ctdb_db, struct vacuum_data
                return -1;
        }
 
-       tune_tdb = tdb_open(vac_dbname, 0, 0, O_RDWR|O_CREAT, 0600);
+       tune_tdb = tdb_open(vac_dbname, 0, 0, O_RDWR|O_CREAT, 0644);
        if (tune_tdb == NULL) {
                DEBUG(DEBUG_ERR,(__location__ " Failed to create/open %s\n", 
TUNINGDBNAME));
                talloc_free(tmp_ctx);
@@ -555,7 +555,7 @@ static int update_tuning_db(struct ctdb_db_context 
*ctdb_db, struct vacuum_data
                    vdata->delete_count < vdata->vacuum_limit) {
                        if (tdata.last_interval < 
ctdb_db->ctdb->tunable.vacuum_max_interval) {
                                tdata.new_interval = tdata.last_interval * 110 
/ 100;
-                               DEBUG(DEBUG_NOTICE,("Increasing vacuum interval 
%u -> %u for %s\n", 
+                               DEBUG(DEBUG_INFO,("Increasing vacuum interval 
%u -> %u for %s\n", 
                                        tdata.last_interval, 
tdata.new_interval, ctdb_db->db_name));
                        }
                } else {
@@ -646,12 +646,12 @@ static int ctdb_repack_db(struct ctdb_db_context 
*ctdb_db, TALLOC_CTX *mem_ctx)
         * decide if a repack is necessary
         */
        if (size < repack_limit && vdata->delete_count < vacuum_limit) {
-               talloc_free(vdata);
                update_tuning_db(ctdb_db, vdata, size);
+               talloc_free(vdata);
                return 0;
        }
 
-       DEBUG(DEBUG_NOTICE,("Repacking %s with %u freelist entries and %u 
records to delete\n", 
+       DEBUG(DEBUG_INFO,("Repacking %s with %u freelist entries and %u records 
to delete\n", 
                        name, size, vdata->delete_count));
 
        /*
@@ -685,9 +685,9 @@ static int get_vacuum_interval(struct ctdb_db_context 
*ctdb_db)
                return interval;
        }
 
-       tdb = tdb_open(vac_dbname, 0, 0, O_RDONLY, 0600);
+       tdb = tdb_open(vac_dbname, 0, 0, O_RDWR|O_CREAT, 0644);
        if (!tdb) {
-               DEBUG(DEBUG_ERR,("Unable to open database %s using default 
interval\n", vac_dbname));
+               DEBUG(DEBUG_ERR,("Unable to open/create database %s using 
default interval\n", vac_dbname));
                talloc_free(tmp_ctx);
                return interval;
        }
@@ -711,8 +711,6 @@ static int get_vacuum_interval(struct ctdb_db_context 
*ctdb_db)
                        }
                }
                free(value.dptr);
-
-               DEBUG(DEBUG_NOTICE,("Using new interval %u for database %s\n", 
interval, ctdb_db->db_name));
        }
        tdb_close(tdb);
 
@@ -727,7 +725,7 @@ static int vacuum_child_destructor(struct 
ctdb_vacuum_child_context *child_ctx)
        struct ctdb_db_context *ctdb_db = child_ctx->vacuum_handle->ctdb_db;
        struct ctdb_context *ctdb = ctdb_db->ctdb;
 
-       DEBUG(DEBUG_ERR,("Vacuuming took %.3f seconds for database %s\n", l, 
ctdb_db->db_name));
+       DEBUG(DEBUG_INFO,("Vacuuming took %.3f seconds for database %s\n", l, 
ctdb_db->db_name));
 
        if (child_ctx->child_pid != -1) {
                kill(child_ctx->child_pid, SIGKILL);
@@ -766,7 +764,7 @@ static void vacuum_child_handler(struct event_context *ev, 
struct fd_event *fde,
        char c = 0;
        int ret;
 
-       DEBUG(DEBUG_NOTICE,("Vacuuming child finished for db %s\n", 
child_ctx->vacuum_handle->ctdb_db->db_name));
+       DEBUG(DEBUG_INFO,("Vacuuming child process %d finished for db %s\n", 
child_ctx->child_pid, child_ctx->vacuum_handle->ctdb_db->db_name));
        child_ctx->child_pid = -1;
 
        ret = read(child_ctx->fd[0], &c, 1);
@@ -799,8 +797,6 @@ ctdb_vacuum_event(struct event_context *ev, struct 
timed_event *te,
                return;
        }
 
-       DEBUG(DEBUG_NOTICE,("Start a vacuuming child process for db %s\n", 
ctdb_db->db_name));
-
        child_ctx = talloc(vacuum_handle, struct ctdb_vacuum_child_context);
        if (child_ctx == NULL) {
                DEBUG(DEBUG_CRIT, (__location__ " Failed to allocate child 
context for vacuuming of %s\n", ctdb_db->db_name));
@@ -831,6 +827,8 @@ ctdb_vacuum_event(struct event_context *ev, struct 
timed_event *te,
                char cc = 0;
                close(child_ctx->fd[0]);
 
+               DEBUG(DEBUG_INFO,("Vacuuming child process %d for db %s 
started\n", getpid(), ctdb_db->db_name));
+       
                if (switch_from_server_to_client(ctdb) != 0) {
                        DEBUG(DEBUG_CRIT, (__location__ "ERROR: failed to 
switch vacuum daemon into client mode. Shutting down.\n"));
                        _exit(1);


-- 
CTDB repository

Reply via email to