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-7.0.0~2023 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9455bfaae91fd666a32b4a4122d52bd4408e97bf;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)); }