mirror of https://github.com/BOINC/boinc.git
- client: it a file upload fails for a job that's in progress,
abort the task. Otherwise we end up reporting the job while the app is still running. svn path=/trunk/boinc/; revision=16128
This commit is contained in:
parent
932eabba94
commit
0cf82b2746
|
@ -8025,3 +8025,12 @@ Charlie 3 Oct 2008
|
|||
|
||||
clientgui/
|
||||
BOINCListCtrl.cpp
|
||||
|
||||
David 4 Oct 2008
|
||||
- client: it a file upload fails for a job that's in progress,
|
||||
abort the task. Otherwise we end up reporting the job
|
||||
while the app is still running.
|
||||
|
||||
client/
|
||||
client_state.cpp
|
||||
cs_trickle.cpp
|
||||
|
|
|
@ -1000,8 +1000,10 @@ bool CLIENT_STATE::garbage_collect_always() {
|
|||
"garbage_collect(); still have active task for acked result %s; state %d",
|
||||
rp->name, atp->task_state()
|
||||
);
|
||||
atp->set_task_state(PROCESS_EXITED, "garbage_collect");
|
||||
// this will get rid of it
|
||||
atp->abort_task(
|
||||
EXIT_ABORTED_BY_CLIENT,
|
||||
"Got ack for job that's till active"
|
||||
);
|
||||
} else {
|
||||
if (log_flags.state_debug) {
|
||||
msg_printf(0, MSG_INFO,
|
||||
|
@ -1038,8 +1040,6 @@ bool CLIENT_STATE::garbage_collect_always() {
|
|||
for (i=0; i<rp->output_files.size(); i++) {
|
||||
// If one of the output files had an upload failure,
|
||||
// mark the result as done and report the error.
|
||||
// The result, workunits, and file infos
|
||||
// will be cleaned up after the server is notified
|
||||
//
|
||||
if (!rp->ready_to_report) {
|
||||
fip = rp->output_files[i].file_info;
|
||||
|
@ -1053,6 +1053,20 @@ bool CLIENT_STATE::garbage_collect_always() {
|
|||
rp->output_files[i].file_info->ref_cnt++;
|
||||
}
|
||||
if (found_error) {
|
||||
// check for process still running; this can happen
|
||||
// e.g. if an intermediate upload fails
|
||||
//
|
||||
ACTIVE_TASK* atp = active_tasks.lookup_result(rp);
|
||||
if (atp) {
|
||||
switch (atp->task_state()) {
|
||||
case PROCESS_EXECUTING:
|
||||
case PROCESS_SUSPENDED:
|
||||
atp->abort_task(
|
||||
EXIT_ABORTED_BY_CLIENT,
|
||||
"Got ack for job that's till active"
|
||||
);
|
||||
}
|
||||
}
|
||||
report_result_error(*rp, "%s", error_str.c_str());
|
||||
}
|
||||
rp->avp->ref_cnt++;
|
||||
|
|
|
@ -86,8 +86,8 @@ int CLIENT_STATE::read_trickle_files(PROJECT* project, FILE* f) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Remove files when ack has been received
|
||||
// remove only this ending with ".sent"
|
||||
// Remove files when ack has been received.
|
||||
// Remove only those ending with ".sent"
|
||||
// (others arrived from application while RPC was happening)
|
||||
//
|
||||
int CLIENT_STATE::remove_trickle_files(PROJECT* project) {
|
||||
|
|
Loading…
Reference in New Issue