mirror of https://github.com/BOINC/boinc.git
scheduler: allow to configure userids for which the scheduler should
not scan the host table. This was previously hardcoded for Einstein@home to prevent some users with many (identical) hosts from flooding the DB with slow queries. Now add <dont_search_host_for_userid>userid</dont_search_host_for_userid> to the project config (in config.xml) for each such userid. svn path=/trunk/boinc/; revision=25346
This commit is contained in:
parent
df439c128b
commit
5bb86f79b8
|
@ -2226,3 +2226,16 @@ Bernd 27 feb 2012
|
||||||
|
|
||||||
sched/
|
sched/
|
||||||
validator.cpp
|
validator.cpp
|
||||||
|
|
||||||
|
Bernd 27 feb 2012
|
||||||
|
- scheduler: allow to configure userids for which the scheduler should
|
||||||
|
not scan the host table. This was previously hardcoded for
|
||||||
|
Einstein@home to prevent some users with many (identical) hosts
|
||||||
|
from flooding the DB with slow queries. Now add
|
||||||
|
<dont_search_host_for_userid>userid</dont_search_host_for_userid>
|
||||||
|
to the project config (in config.xml) for each such userid.
|
||||||
|
|
||||||
|
sched/
|
||||||
|
sched_config.h
|
||||||
|
sched_config.cpp
|
||||||
|
handle_request.cpp
|
||||||
|
|
|
@ -68,11 +68,11 @@ static bool find_host_by_other(DB_USER& user, HOST req_host, DB_HOST& host) {
|
||||||
char buf[2048];
|
char buf[2048];
|
||||||
char dn[512], ip[512], os[512], pm[512];
|
char dn[512], ip[512], os[512], pm[512];
|
||||||
|
|
||||||
#ifdef EINSTEIN_AT_HOME
|
// don't dig through hosts of these users
|
||||||
// This is to prevent GRID hosts that manipulate their hostids from flooding E@H's DB with slow queries
|
// prevents flooding the DB with slow queries from users with many hosts
|
||||||
if ((user.id == 282952) || (user.id == 243543))
|
for(unsigned int i=0; i < config.dont_search_host_for_userid.size(); i++)
|
||||||
|
if (user.id == config.dont_search_host_for_userid[i])
|
||||||
return false;
|
return false;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Only check if the fields are populated
|
// Only check if the fields are populated
|
||||||
if (strlen(req_host.domain_name) && strlen(req_host.last_ip_addr) && strlen(req_host.os_name) && strlen(req_host.p_model)) {
|
if (strlen(req_host.domain_name) && strlen(req_host.last_ip_addr) && strlen(req_host.os_name) && strlen(req_host.p_model)) {
|
||||||
|
|
|
@ -199,6 +199,10 @@ int SCHED_CONFIG::parse(FILE* f) {
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (xp.parse_int(tag, "dont_search_host_for_user", retval)) {
|
||||||
|
dont_search_host_for_userid.push_back(retval);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (xp.parse_int("daily_result_quota", daily_result_quota)) continue;
|
if (xp.parse_int("daily_result_quota", daily_result_quota)) continue;
|
||||||
if (xp.parse_double("default_disk_max_used_gb", default_disk_max_used_gb)) continue;
|
if (xp.parse_double("default_disk_max_used_gb", default_disk_max_used_gb)) continue;
|
||||||
if (xp.parse_double("default_disk_max_used_pct", default_disk_max_used_pct)) continue;
|
if (xp.parse_double("default_disk_max_used_pct", default_disk_max_used_pct)) continue;
|
||||||
|
|
|
@ -104,6 +104,7 @@ struct SCHED_CONFIG {
|
||||||
|
|
||||||
vector<regex_t> *ban_cpu;
|
vector<regex_t> *ban_cpu;
|
||||||
vector<regex_t> *ban_os;
|
vector<regex_t> *ban_os;
|
||||||
|
vector<int> dont_search_host_for_userid;
|
||||||
int daily_result_quota; // max results per day is this * mult
|
int daily_result_quota; // max results per day is this * mult
|
||||||
double default_disk_max_used_gb;
|
double default_disk_max_used_gb;
|
||||||
double default_disk_max_used_pct;
|
double default_disk_max_used_pct;
|
||||||
|
|
Loading…
Reference in New Issue