diff --git a/client/scheduler_op.C b/client/scheduler_op.C
index e136015a26..38202a74bc 100644
--- a/client/scheduler_op.C
+++ b/client/scheduler_op.C
@@ -130,13 +130,13 @@ int SCHEDULER_OP::set_min_rpc_time(PROJECT* p) {
if (log_flags.sched_op_debug) {
printf("we've hit the limit on master_url fetches\n");
}
- exp_backoff = (int) exp(drand()*MASTER_FETCH_INTERVAL);
- p->min_rpc_time = time(0) + exp_backoff;
+ x = exp(drand()*p->master_fetch_failures);
+ exp_backoff = (int) min((int)x,MASTER_FETCH_INTERVAL);
} else {
x = RETRY_BASE_PERIOD * exp(drand() * n);
exp_backoff = (int)max(SCHED_RETRY_DELAY_MIN,min(SCHED_RETRY_DELAY_MAX,(int) x));
- p->min_rpc_time = time(0) + exp_backoff;
}
+ p->min_rpc_time = time(0) + exp_backoff;
if (log_flags.sched_op_debug) {
printf(
"setting min RPC time for %s to %d seconds from now\n",
@@ -516,29 +516,18 @@ int SCHEDULER_REPLY::parse(FILE* in) {
while (fgets(buf, 256, in)) {
if (match_tag(buf, "")) {
// Do nothing
- } else if (match_tag(buf, "")) {
- return 0;
- } else if (parse_str(buf, "", project_name, sizeof(project_name))) {
- continue;
- } else if (parse_str(buf, "", user_name, sizeof(user_name))) {
- continue;
- } else if (parse_double(buf, "", user_total_credit)) {
- continue;
- } else if (parse_double(buf, "", user_expavg_credit)) {
- continue;
- } else if (parse_int(buf, "", (int &)user_create_time)) {
- continue;
- } else if (parse_int(buf, "", hostid)) {
- continue;
- } else if (parse_double(buf, "", host_total_credit)) {
- continue;
- } else if (parse_double(buf, "", host_expavg_credit)) {
- continue;
- } else if (parse_int(buf, "", (int &)host_create_time)) {
- continue;
- } else if (parse_int(buf, "", request_delay)) {
- continue;
- } else if (match_tag(buf, "")) {
+ } else if (match_tag(buf, "")) return 0;
+ else if (parse_str(buf, "", project_name, sizeof(project_name))) continue;
+ else if (parse_str(buf, "", user_name, sizeof(user_name))) continue;
+ else if (parse_double(buf, "", user_total_credit)) continue;
+ else if (parse_double(buf, "", user_expavg_credit)) continue;
+ else if (parse_int(buf, "", (int &)user_create_time)) continue;
+ else if (parse_int(buf, "", hostid)) continue;
+ else if (parse_double(buf, "", host_total_credit)) continue;
+ else if (parse_double(buf, "", host_expavg_credit)) continue;
+ else if (parse_int(buf, "", (int &)host_create_time)) continue;
+ else if (parse_int(buf, "", request_delay)) continue;
+ else if (match_tag(buf, "")) {
retval = dup_element_contents(
in,
"",