-
David Anderson authored
A while back we added a mechanism intended to defer work-request RPCs while file uploads are happening, with the goal of reporting completed tasks sooner and reducing the number of RPCs. There were 2 bugs in this mechanism. First, the decision of whether an upload is active was flawed; if several uploads were active and 1 finished, it would act like all had finished. Second, when WORK_FETCH::choose_project.cpp() picks a project, it sets p->sched_rpc_pending to RPC_REASON_NEED_WORK. If we then decide not to request work because an upload is active, we need to clear this field. Otherwise scheduler_rpc_poll() will do an RPC to it, piggybacking a work request and bypassing the upload check.
eee2879a