mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
iterator works better with failing hosts.
git-svn-id: file:///svn/unbound/trunk@571 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
fd7af10ff6
commit
2540d6c511
3 changed files with 20 additions and 7 deletions
|
|
@ -142,7 +142,6 @@ worker_mem_report(struct worker* worker, struct serviced_query* cur_serv)
|
|||
sizeof(*worker->env.scratch_buffer) +
|
||||
ldns_buffer_capacity(worker->env.scratch_buffer);
|
||||
if(cur_serv) {
|
||||
log_info("cur_serv = %d", (int)serviced_get_mem(cur_serv));
|
||||
me += serviced_get_mem(cur_serv);
|
||||
}
|
||||
total = front+back+mesh+msg+rrset+infra+iter+val+ac+superac+me;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
31 August 2007: Wouter
|
||||
- can read bind trusted-keys { ... }; files, in a compatibility mode.
|
||||
- iterator should not detach target queries that it still could need.
|
||||
the protection against multiple outstanding queries is moved to a
|
||||
current_query num check.
|
||||
|
||||
30 August 2007: Wouter
|
||||
- fixup override date config option.
|
||||
|
|
|
|||
|
|
@ -915,6 +915,15 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq,
|
|||
verbose(VERB_DETAIL, "Failed to get a delegation, giving up");
|
||||
return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
|
||||
}
|
||||
delegpt_log(iq->dp);
|
||||
|
||||
if(iq->num_current_queries>0) {
|
||||
/* already busy answering a query, this restart is because
|
||||
* more delegpt addrs became available, wait for existing
|
||||
* query. */
|
||||
verbose(VERB_ALGO, "woke up, but wait for outstanding query");
|
||||
return 0;
|
||||
}
|
||||
|
||||
tf_policy = 0;
|
||||
if(iq->depth <= ie->max_dependency_depth) {
|
||||
|
|
@ -996,11 +1005,6 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq,
|
|||
iq->num_current_queries);
|
||||
return 0;
|
||||
}
|
||||
/* move other targets to slumber list */
|
||||
if(iq->num_target_queries>0) {
|
||||
(*qstate->env->detach_subs)(qstate);
|
||||
iq->num_target_queries = 0;
|
||||
}
|
||||
|
||||
/* We have a valid target. */
|
||||
log_query_info(VERB_DETAIL, "sending query:", &iq->qchase);
|
||||
|
|
@ -1271,6 +1275,8 @@ processTargetResponse(struct module_qstate* qstate, int id,
|
|||
log_assert(qstate->return_rcode == LDNS_RCODE_NOERROR);
|
||||
|
||||
foriq->state = QUERYTARGETS_STATE;
|
||||
log_query_info(VERB_ALGO, "processTargetResponse", &qstate->qinfo);
|
||||
log_query_info(VERB_ALGO, "processTargetResponse super", &forq->qinfo);
|
||||
|
||||
/* check to see if parent event is still interested (in orig name). */
|
||||
dpns = delegpt_find_ns(foriq->dp, qstate->qinfo.qname,
|
||||
|
|
@ -1307,7 +1313,12 @@ processTargetResponse(struct module_qstate* qstate, int id,
|
|||
}
|
||||
if(!delegpt_add_rrset(foriq->dp, forq->region, rrset))
|
||||
log_err("out of memory adding targets");
|
||||
} else dpns->resolved = 1; /* fail the target */
|
||||
verbose(VERB_ALGO, "added target response");
|
||||
delegpt_log(foriq->dp);
|
||||
} else {
|
||||
verbose(VERB_ALGO, "iterator TargetResponse failed");
|
||||
dpns->resolved = 1; /* fail the target */
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue