From 86c3728abe8d3b29ddf8e58a5abf68a2a771ab58 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 7 Jan 2005 19:45:46 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5020 --- checkin_notes | 18 +++++++++++++++++- db/constraints.sql | 5 +---- html/ops/db_update.php | 6 ++++++ sched/db_dump.C | 14 +++++++++++--- sched/sched_locality.C | 6 ++++-- 5 files changed, 39 insertions(+), 10 deletions(-) diff --git a/checkin_notes b/checkin_notes index 93961fcfb9..6b1b61dddf 100755 --- a/checkin_notes +++ b/checkin_notes @@ -22195,4 +22195,20 @@ Janus 7 Jan 2005 edit_forum_preferences_action.php /html/inc forum_show.inc - forum.inc \ No newline at end of file + forum.inc + +David 7 Jan 2005 + - drop the indices on mod_time. + (result: app_mod_time, workunit: wu_filedel) + For SETI@home they were too much of a performance hit. + They're needed only for db_purge and result_summary.php, + which will have to do a sequential scan instead + - db_dump: try several times to remove old stats directory + + db/ + constraints.sql + html/ops/ + db_update.php + sched/ + db_dump.C + sched_locality.C diff --git a/db/constraints.sql b/db/constraints.sql index a223c263d4..a5cbea50d1 100644 --- a/db/constraints.sql +++ b/db/constraints.sql @@ -32,7 +32,7 @@ alter table workunit -- validator add index wu_timeout (transition_time), -- transitioner - add index wu_filedel (file_delete_state, mod_time), + add index wu_filedel (file_delete_state), -- file_deleter, db_purge add index wu_assim (appid, assimilate_state); -- assimilator @@ -66,9 +66,6 @@ alter table result add index res_wu_user (workunitid, userid), -- scheduler (avoid sending mult results of same WU to one user) - add index app_mod_time (appid, mod_time desc); - -- html_ops/result_summary.php - alter table msg_from_host add index message_handled (handled); -- for message handler diff --git a/html/ops/db_update.php b/html/ops/db_update.php index 69eccb4b5d..0e6d41b285 100644 --- a/html/ops/db_update.php +++ b/html/ops/db_update.php @@ -204,6 +204,12 @@ function update_12_27_2004() { mysql_query("alter table workunit add index wu_filedel (file_delete_state, mod_time)"); } +function update_1_3_2005() { + mysql_query("alter table workunit drop index wu_filedel"); + mysql_query("alter table workunit add index wu_filedel (file_delete_state)"); + mysql_query("alter table result drop index app_mod_time"); +} + //update_10_25_2004(); ?> diff --git a/sched/db_dump.C b/sched/db_dump.C index a935587156..40e75a4d20 100644 --- a/sched/db_dump.C +++ b/sched/db_dump.C @@ -778,9 +778,17 @@ int main(int argc, char** argv) { sprintf(buf, "cp %s %s/db_dump.xml", spec_filename, spec.output_dir); system(buf); - sprintf(buf, "/bin/rm -rf %s; mv %s %s", - spec.final_output_dir, spec.output_dir, spec.final_output_dir - ); + sprintf(buf, "/bin/rm -rf %s", spec.final_output_dir); + for (int i=0; i<10; i++) { + retval = system(buf); + if (!retval) break; + sleep(1); + } + if (retval) { + log_messages.printf(SCHED_MSG_LOG::CRITICAL, "Can't remove old stats\n"); + exit(1); + } + sprintf(buf, "mv %s %s", spec.output_dir, spec.final_output_dir); system(buf); log_messages.printf(SCHED_MSG_LOG::NORMAL, "db_dump finished\n"); } diff --git a/sched/sched_locality.C b/sched/sched_locality.C index 5792e8a5dd..5594ece99f 100644 --- a/sched/sched_locality.C +++ b/sched/sched_locality.C @@ -37,6 +37,8 @@ #include "sched_msgs.h" #include "sched_locality.h" +// get filename from result name +// static int extract_filename(char* in, char* out) { strcpy(out, in); char* p = strstr(out, "__"); @@ -184,8 +186,8 @@ static void send_new_file_work( retval = extract_filename(result.name, filename); if (retval) { log_messages.printf( - SCHED_MSG_LOG::CRITICAL, - "bad filename: %s\n", result.name + SCHED_MSG_LOG::DEBUG + "result doesn't contain filename: %s\n", result.name ); continue; }