diff --git a/checkin_notes b/checkin_notes index f640f2b209..d04bba392c 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6025,6 +6025,8 @@ Bruce 4 May 2005 - log execution times for two cgi scripts (scheduler and file_upload_handler) - better print format for timezone + - bug fix: with locality scheduling, permit multiple requests + to make work for same file. Bug introduced April 11, 2005. sched/ sched_util.h @@ -6033,4 +6035,5 @@ Bruce 4 May 2005 main.C sched_send.C file_upload_handler.C + sched_locality.C diff --git a/sched/sched_locality.C b/sched/sched_locality.C index a3ded3bfa1..f2f14090b0 100644 --- a/sched/sched_locality.C +++ b/sched/sched_locality.C @@ -390,7 +390,7 @@ static int send_results_for_file( ) { DB_RESULT result, prev_result; char buf[256], query[1024]; - int i, maxid, retval_max, retval_lookup, has_slept=0; + int i, maxid, retval_max, retval_lookup, sleep_made_no_work=0; nsent = 0; @@ -521,13 +521,13 @@ static int send_results_for_file( // again, or we have already tried to find work for this // file, we are finished. // - if (!config.locality_scheduling_wait_period || has_slept) { + if (!config.locality_scheduling_wait_period || sleep_made_no_work) { break; } // wait a bit and try again to find a suitable unsent result sleep(config.locality_scheduling_wait_period); - has_slept=1; + sleep_made_no_work=1; } // query_retval else { @@ -560,6 +560,7 @@ static int send_results_for_file( // this is only wacky if !one_wu_per_result_per_host. if (!retval_send) { nsent++; + sleep_made_no_work=0; } else if (!config.one_result_per_user_per_wu) { log_messages.printf(SCHED_MSG_LOG::CRITICAL, "Database inconsistency? possibly_send_result(%d) failed for [RESULT#%d], returning %d\n",