query cache ttl set to lowest served record ttl #662

Closed
Habbie opened this Issue Apr 26, 2013 · 1 comment

Projects

None yet

1 participant

@Habbie
Member
Habbie commented Apr 26, 2013

14:25:58) jalh: in UeberBackend::addCache
(14:26:03) jalh: static unsigned int queryttl=::arg().asNum("query-cache-ttl");
(14:26:09) jalh: if (rr.ttl < queryttl)
(14:26:09) jalh: queryttl = rr.ttl;
(14:26:31) Habbie: i wrote that and i'm pretty sure it's good
(14:26:31) Habbie: why?
(14:26:39) jalh: i think that means if you have any rr ever served with a ttl < query-cache-ttl then after that point your querycache ttl will be reduced
(14:26:46) jalh: because you are static on queryttl
(14:26:57) Habbie: hmm
(14:27:06) Habbie: are you saying the =::arg will only be done once?
(14:27:12) jalh: thats the point of static i believe
(14:27:19) Habbie: then yes, that would be a bug
(14:27:26) jalh: which is good as you dont want to do that ::arg call each turn
(14:27:27) Habbie: the idea is to get min(rr.ttl, query-cache-ttl) on every insert
(14:27:31) jalh: yeah
(14:27:34) Habbie: as i'm sure you figured
(14:27:34) jalh: probably just want a temp integer
(14:27:38) Habbie: indeed
(14:27:46) Habbie: can you shoot me a ticket? bit busy today
(14:27:49) jalh: k
(14:27:56) Habbie: thanks

@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie Habbie added a commit that referenced this issue Apr 26, 2013
@Habbie Habbie Mark Zealey noted that RRs with low TTLs could lower our query-cache-…
…ttl persistently. Closes #662

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3023 d19b8d6e-7fed-0310-83ef-9ca221ded41b
46c6efb
@Habbie
Member
Habbie commented Apr 26, 2013

Author: peter
r3023, thanks!

@mind04 mind04 pushed a commit to mind04/pdns that referenced this issue Apr 26, 2013
peter Mark Zealey noted that RRs with low TTLs could lower our query-cache-…
…ttl persistently. Closes #662

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3023 d19b8d6e-7fed-0310-83ef-9ca221ded41b
540f79a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment