From: Kern S. <ke...@us...> - 2010-03-31 17:20:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Bacula". The branch, master has been updated via bf3994c03c509eb6b09de71f6b43ed9322ed5c82 (commit) via 1897de053e3406096d570b3ca88f93762d013540 (commit) from bf6934628ae91be8446c4f6586332c47a84404b6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bf3994c03c509eb6b09de71f6b43ed9322ed5c82 Author: Kern Sibbald <ke...@si...> Date: Wed Mar 31 19:20:43 2010 +0200 Fix SQL warning message about concurrency pointed out by Graham commit 1897de053e3406096d570b3ca88f93762d013540 Author: Kern Sibbald <ke...@si...> Date: Wed Mar 31 19:14:08 2010 +0200 Fix compiler warning ----------------------------------------------------------------------- Summary of changes: diff --git a/bacula/src/cats/sql.c b/bacula/src/cats/sql.c index 8b910a1..54e4671 100644 --- a/bacula/src/cats/sql.c +++ b/bacula/src/cats/sql.c @@ -201,9 +201,10 @@ bool db_check_max_connections(JCR *jcr, B_DB *mdb, uint32_t max_concurrent_jobs) } if (max_conn && max_concurrent_jobs && max_concurrent_jobs > max_conn) { Mmsg(mdb->errmsg, - _("On db_name=%s, %s max_connections=%d is lower than Director " - "MaxConcurentJobs=%d\n"), - mdb->db_name, db_get_type(), max_conn, max_concurrent_jobs); + _("Potential performance problem:\n" + "max_connections=%d set for %s database \"%s\" should be larger than Director's " + "MaxConcurrentJobs=%d\n"), + max_conn, db_get_type(), mdb->db_name, max_concurrent_jobs); Jmsg(jcr, M_WARNING, 0, "%s", mdb->errmsg); ret = false; } diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index a34fe4a..493bff0 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -960,7 +960,7 @@ static bool check_catalog(cat_op mode) } /* Display a message if the db max_connections is too low */ - if (!db_check_max_connections(NULL, db, director->MaxConcurrentJobs+1)) { + if (!db_check_max_connections(NULL, db, director->MaxConcurrentJobs)) { Pmsg1(000, "Warning, settings problem for Catalog=%s\n", catalog->name()); Pmsg1(000, "%s", db_strerror(db)); } diff --git a/bacula/src/lib/jcr.c b/bacula/src/lib/jcr.c index 0367bf0..242480f 100644 --- a/bacula/src/lib/jcr.c +++ b/bacula/src/lib/jcr.c @@ -980,7 +980,7 @@ int job_count() int count = 0; lock_jcr_chain(); - for (jcr = (JCR *)jcrs->first(); jcr = (JCR *)jcrs->next(jcr); ) { + for (jcr = (JCR *)jcrs->first(); (jcr = (JCR *)jcrs->next(jcr)); ) { if (jcr->JobId > 0) { count++; } hooks/post-receive -- Bacula |