- 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
This commit is contained in:
David Anderson 2011-06-03 18:45:21 +00:00
parent 673626936d
commit e8c5e5bf5f
3 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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;

View File

@ -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.