From: Kern Sibbald Date: Wed, 31 Mar 2010 17:20:43 +0000 (+0200) Subject: Fix SQL warning message about concurrency pointed out by Graham X-Git-Tag: Release-5.2.1~1558 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=75b9181f17e37e661feae3b3ae8b6f5154e14e83;p=bacula%2Fbacula Fix SQL warning message about concurrency pointed out by Graham --- diff --git a/bacula/src/cats/sql.c b/bacula/src/cats/sql.c index 8b910a1fba..54e4671c69 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 a34fe4a933..493bff07f3 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)); }