[system] assertion "env->is_cache" failed in cdb_write
- /cache/prefill: fix 6.0.13 regression (!1705)
- datamodel: improve file permission check (#933, !1714)
+- NO_CACHE flag: fix and tweak its behavior (!1715)
Improvements
------------
/* We first check various exit-conditions and then call the _real function. */
if (!kr_cache_is_open(&req->ctx->cache)
- || qry->flags.NO_CACHE
|| !check_rrtype(qry->stype, qry) /* LATER: some other behavior for some of these? */
|| qry->sclass != KNOT_CLASS_IN) {
return ctx->state; /* Already resolved/failed or already tried, etc. */
}
+ /* Only skip cache if (flagged and) resolving the origin query or its xNAME chain,
+ * not when resolving dependencies such as nameserver records or DNSSEC chain. */
+ if (qry->flags.NO_CACHE) {
+ const struct kr_query *q = qry;
+ while (q->cname_parent)
+ q = q->cname_parent;
+ if (!q->parent)
+ return ctx->state;
+ }
if (qry->stype == KNOT_RRTYPE_NSEC) {
VERBOSE_MSG(qry, "=> skipping stype NSEC\n");