mirror of https://github.com/BOINC/boinc.git
- server: fix botched checkin from 7 March.
The new field (workunit.rsc_bandwidth_bound) goes at the END of the record. Always do it this way! - make_work: after creating a batch of new WUs, we were waiting 60 sec for the transitioner to create the results for them (so that our next count of unsent results would be correct). This is bogus; if e.g. the transitioner isn't running, we'll never get the results, and we'll keep creating WUs forever. Instead: explicitly wait for there to be results for the last WU from the batch just created. - scheduler: parse <allow_non_preferred_apps>, <allow_beta_work> correctly. svn path=/trunk/boinc/; revision=14875
This commit is contained in:
parent
27491c9d69
commit
546c0b899a
|
@ -2123,3 +2123,28 @@ David Mar 9 2008
|
|||
AdvancedFrame.cpp
|
||||
lib/
|
||||
util.C
|
||||
|
||||
David Mar 10 2008
|
||||
- server: fix botched checkin from 7 March.
|
||||
The new field (workunit.rsc_bandwidth_bound)
|
||||
goes at the END of the record.
|
||||
Always do it this way!
|
||||
- make_work: after creating a batch of new WUs,
|
||||
we were waiting 60 sec for the transitioner to
|
||||
create the results for them
|
||||
(so that our next count of unsent results would be correct).
|
||||
This is bogus; if e.g. the transitioner isn't running,
|
||||
we'll never get the results, and we'll keep creating WUs forever.
|
||||
|
||||
Instead: explicitly wait for there to be results for
|
||||
the last WU from the batch just created.
|
||||
|
||||
- scheduler: parse <allow_non_preferred_apps>, <allow_beta_work> correctly.
|
||||
|
||||
db/
|
||||
schema.sql
|
||||
html/ops/
|
||||
db_update.php
|
||||
sched/
|
||||
make_work.C
|
||||
send.C
|
||||
|
|
|
@ -192,7 +192,6 @@ create table workunit (
|
|||
rsc_fpops_bound double not null,
|
||||
rsc_memory_bound double not null,
|
||||
rsc_disk_bound double not null,
|
||||
rsc_bandwidth_bound double not null,
|
||||
need_validate smallint not null,
|
||||
canonical_resultid integer not null,
|
||||
canonical_credit double not null,
|
||||
|
@ -210,6 +209,7 @@ create table workunit (
|
|||
max_success_results integer not null,
|
||||
result_template_file varchar(63) not null,
|
||||
priority integer not null,
|
||||
rsc_bandwidth_bound double not null,
|
||||
mod_time timestamp,
|
||||
primary key (id)
|
||||
) engine=InnoDB;
|
||||
|
|
|
@ -555,15 +555,24 @@ function update_2_18_2008() {
|
|||
");
|
||||
}
|
||||
|
||||
// If you haven't done 3_7, skip both of the following:
|
||||
//
|
||||
function update_3_7_2008() {
|
||||
do_query("alter table workunit add column rsc_bandwidth_bound double not null after rsc_disk_bound");
|
||||
}
|
||||
function update_3_7_undo_2008() {
|
||||
do_query("alter table workunit drop column rsc_bandwidth_bound");
|
||||
}
|
||||
|
||||
function update_3_10_2008() {
|
||||
do_query("alter table workunit add column rsc_bandwidth_bound double not null");
|
||||
}
|
||||
|
||||
// modify the following to call the function you want.
|
||||
// Make sure you do all needed functions, in order.
|
||||
// (Look at your DB structure using "explain" queries to see
|
||||
// which ones you need).
|
||||
|
||||
//update_2_18_2008();
|
||||
update_3_10_2008();
|
||||
|
||||
?>
|
||||
|
|
|
@ -145,6 +145,27 @@ void make_new_wu(DB_WORKUNIT& original_wu, char* starting_xml, int start_time) {
|
|||
);
|
||||
}
|
||||
|
||||
// wait for the transitioner to create a result for the given WU.
|
||||
// This keeps us from getting infinitely far ahead of the transitioner
|
||||
// (e.g. if the transitioner isn't running)
|
||||
//
|
||||
void wait_for_results(int wu_id) {
|
||||
DB_RESULT result;
|
||||
int count, retval;
|
||||
char buf[256];
|
||||
|
||||
sprintf(buf, "where workunitid=%d", wu_id);
|
||||
while (1) {
|
||||
retval = result.count(count, buf);
|
||||
if (retval) {
|
||||
log_messages.printf(MSG_CRITICAL, "result.count: %d\n", retval);
|
||||
exit(1);
|
||||
}
|
||||
if (count > 0) return;
|
||||
sleep(10);
|
||||
}
|
||||
}
|
||||
|
||||
void make_work(vector<string> &wu_names) {
|
||||
int retval, start_time=time(0);
|
||||
char keypath[256];
|
||||
|
@ -218,6 +239,7 @@ void make_work(vector<string> &wu_names) {
|
|||
|
||||
int results_needed = cushion - unsent_results;
|
||||
|
||||
int new_wu_id = 0;
|
||||
while (1) {
|
||||
DB_WORKUNIT& wu = wus[index++];
|
||||
if (index == nwu_names) index=0;
|
||||
|
@ -229,14 +251,14 @@ void make_work(vector<string> &wu_names) {
|
|||
total_wus++;
|
||||
}
|
||||
make_new_wu(wu, wu.xml_doc, start_time);
|
||||
new_wu_id = wu.id;
|
||||
results_needed -= wu.target_nresults;
|
||||
if (results_needed <= 0) break;
|
||||
}
|
||||
|
||||
if (one_pass) break;
|
||||
// wait a while for the transitioner to make results
|
||||
//
|
||||
sleep(60);
|
||||
|
||||
wait_for_results(new_wu_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -287,6 +287,7 @@ static int get_host_info(SCHEDULER_REPLY& reply) {
|
|||
std::string str;
|
||||
unsigned int pos = 0;
|
||||
int temp_int;
|
||||
bool flag;
|
||||
|
||||
extract_venue(reply.user.project_prefs, reply.host.venue, buf);
|
||||
str = buf;
|
||||
|
@ -303,11 +304,11 @@ static int get_host_info(SCHEDULER_REPLY& reply) {
|
|||
|
||||
pos = str.find("<app_id>", pos) + 1;
|
||||
}
|
||||
if (parse_int(buf,"<allow_non_preferred_apps>", temp_int)) {
|
||||
reply.wreq.host_info.allow_non_preferred_apps = true;
|
||||
if (parse_bool(buf,"<allow_non_preferred_apps>", flag)) {
|
||||
reply.wreq.host_info.allow_non_preferred_apps = flag;
|
||||
}
|
||||
if (parse_int(buf,"<allow_beta_work>", temp_int)) {
|
||||
reply.wreq.host_info.allow_beta_work = true;
|
||||
if (parse_bool(buf,"<allow_beta_work>", flag)) {
|
||||
reply.wreq.host_info.allow_beta_work = flag;
|
||||
}
|
||||
|
||||
// Decide whether or not this computer is a 'reliable' computer
|
||||
|
|
Loading…
Reference in New Issue