Skip to content

Commit

Permalink
Merge pull request #3603 from stream1972/stream_for_merge
Browse files Browse the repository at this point in the history
transitioner: Fix race condition with file_upload_handler
  • Loading branch information
TheAspens authored May 11, 2020
2 parents 8fb9094 + b3fb4c1 commit 8ae81c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion db/boinc_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1800,8 +1800,11 @@ int DB_TRANSITIONER_ITEM_SET::update_workunit(
sprintf(buf, " file_delete_state=%d,", ti.file_delete_state);
strcat(updates, buf);
}
// Don't update transition_time if it changed in database because something
// happened in background (usually, another result was uploaded).
// Instead, force another run of transitioner to handle these changes.
if (ti.transition_time != ti_original.transition_time) {
sprintf(buf, " transition_time=%d,", ti.transition_time);
sprintf(buf, " transition_time=if(transition_time=%d,%d,%d),", ti_original.transition_time, ti.transition_time, (int)time(NULL));
strcat(updates, buf);
}
if (ti.hr_class != ti_original.hr_class) {
Expand Down

0 comments on commit 8ae81c1

Please sign in to comment.