From e8c5e5bf5f387bee4ab737ebd974133b92aa7848 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 3 Jun 2011 18:45:21 +0000 Subject: [PATCH] - client: my checkin of 8 Apr 2011 didn't work in some cases, e.g.: - client finishes a job - before upload starts, work fetch runs and decides to fetch work from that project. Solution: - set PROJECT::last_upload_start when job finishes, and clear it when a job is uploaded. - defer scheduler RPC for a limited time if last_upload_start is set, even if a transfer is not active svn path=/trunk/boinc/; revision=23633 --- checkin_notes | 15 +++++++++++++++ client/client_state.cpp | 1 + client/cs_scheduler.cpp | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 9898ceeb90..5b13811dc1 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3251,3 +3251,18 @@ Charlie 3 Jun 2011 clientgui/ browser.cpp + +David 3 Jun 2011 + - client: my checkin of 8 Apr 2011 didn't work in some cases, e.g.: + - client finishes a job + - before upload starts, work fetch runs and decides to fetch work + from that project. + Solution: + - set PROJECT::last_upload_start when job finishes, + and clear it when a job is uploaded. + - defer scheduler RPC for a limited time if last_upload_start + is set, even if a transfer is not active + + client/ + client_state.cpp + cs_scheduler.cpp diff --git a/client/client_state.cpp b/client/client_state.cpp index a8c49f4257..0f14530482 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -1500,6 +1500,7 @@ bool CLIENT_STATE::update_results() { if (rp->is_upload_done()) { rp->ready_to_report = true; rp->completed_time = gstate.now; + rp->project->last_upload_start = 0; rp->set_state(RESULT_FILES_UPLOADED, "CS::update_results"); // clear backoffs for app's resources; diff --git a/client/cs_scheduler.cpp b/client/cs_scheduler.cpp index 29cbea5135..cb96feacf4 100644 --- a/client/cs_scheduler.cpp +++ b/client/cs_scheduler.cpp @@ -373,7 +373,7 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) { // the project is uploading, and it started recently // static inline bool actively_uploading(PROJECT* p) { - return p->uploading() && (gstate.now - p->last_upload_start < WF_DEFER_INTERVAL); + return gstate.now - p->last_upload_start < WF_DEFER_INTERVAL; } // called from the client's polling loop.