Skip to content
Snippets Groups Projects
Verified Commit b6049563 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

reduce verbose logging - cases not really useful

Also tweak order of information when logging cache stash,
as it was rather unnatural.
parent 56103271
No related branches found
No related tags found
1 merge request!600NSEC3 aggressive caching
......@@ -550,9 +550,9 @@ static ssize_t stash_rrset(struct kr_cache *cache, const struct kr_query *qry,
|| rr->type == KNOT_RRTYPE_NS) {
auto_free char *type_str = kr_rrtype_text(rr->type),
*encl_str = kr_dname_text(encloser);
VERBOSE_MSG(qry, "=> stashed rank: 0%.2o, %s %s%s "
"(%d B total, incl. %d RRSIGs)\n",
rank, type_str, (wild_labels ? "*." : ""), encl_str,
VERBOSE_MSG(qry, "=> stashed %s%s %s, rank 0%.2o, "
"%d B total, incl. %d RRSIGs\n",
(wild_labels ? "*." : ""), encl_str, type_str, rank,
(int)val_new_entry.len, (rr_sigs ? rr_sigs->rrs.rr_count : 0)
);
} }
......@@ -569,6 +569,9 @@ static int stash_rrarray_entry(ranked_rr_array_t *arr, int arr_i,
return kr_ok();
}
const knot_rrset_t *rr = entry->rr;
if (rr->type == KNOT_RRTYPE_RRSIG) {
return kr_ok(); /* reduce verbose logging from the following call */
}
int ret = stash_rrset_precond(rr, qry);
if (ret <= 0) {
return ret;
......
......@@ -107,7 +107,6 @@ int peek_nosync(kr_layer_t *ctx, knot_pkt_t *pkt)
knot_db_val_t val = { NULL, 0 };
ret = cache_op(cache, read, &key, &val, 1);
if (!ret) {
VERBOSE_MSG(qry, "=> read OK\n");
/* found an entry: test conditions, materialize into pkt, etc. */
ret = found_exact_hit(ctx, pkt, val, lowest_rank);
}
......@@ -438,7 +437,6 @@ static int found_exact_hit(kr_layer_t *ctx, knot_pkt_t *pkt, knot_db_val_t val,
int ret = entry_h_seek(&val, qry->stype);
if (ret) return ret;
VERBOSE_MSG(qry, "=> FEH seek OK \n");
const struct entry_h *eh = entry_h_consistent(val, qry->stype);
if (!eh) {
assert(false);
......@@ -446,7 +444,6 @@ static int found_exact_hit(kr_layer_t *ctx, knot_pkt_t *pkt, knot_db_val_t val,
// LATER: recovery in case of error, perhaps via removing the entry?
// LATER(optim): pehaps optimize the zone cut search
}
VERBOSE_MSG(qry, "=> FEH consistent OK \n");
int32_t new_ttl = get_new_ttl(eh, qry, qry->sname, qry->stype,
qry->timestamp.tv_sec);
......
......@@ -595,7 +595,6 @@ static int answer_finalize(struct kr_request *request, int state)
* Be conservative. Primary approach: check ranks of all RRs in wire.
* Only "negative answers" need special handling. */
bool secure = (last != NULL); /* suspicious otherwise */
VERBOSE_MSG(NULL, "AD: secure (start)\n");
if (last && (last->flags.STUB)) {
secure = false; /* don't trust forwarding for now */
}
......@@ -618,7 +617,6 @@ static int answer_finalize(struct kr_request *request, int state)
}
}
VERBOSE_MSG(NULL, "AD: secure (between ANS and AUTH)\n");
/* Write authority records. */
if (answer->current < KNOT_AUTHORITY) {
knot_pkt_begin(answer, KNOT_AUTHORITY);
......@@ -645,7 +643,6 @@ static int answer_finalize(struct kr_request *request, int state)
/* AD: "negative answers" need more handling. */
if (last && secure) {
VERBOSE_MSG(NULL, "AD: secure (1)\n");
if (kr_response_classify(answer) != PKT_NOERROR
/* Additionally check for CNAME chains that "end in NODATA",
* as those would also be PKT_NOERROR. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment