[Pdns-dev] PacketCache::purge
Bill Snow
bsnow at afilias.info
Wed Nov 9 14:16:49 CET 2011
On Wed, Nov 9, 2011 at 3:17 AM, bert hubert <bert.hubert at netherlabs.nl> wrote:
> On Tue, Nov 08, 2011 at 04:58:30AM -0500, Bill Snow wrote:
>> Does anybody know why PacketCache::purge(const vector<string>
>> &matches) seems to explicitly skip the first of the list of matches?
>
> http://wiki.powerdns.com/trac/changeset/2297 explains it best. It is indeed
> a wart.
Hmm, a wart indeed. It should be easy to work around by adding a
nonsense entry before the one
to be legitimately purged, if that's considered best practice.
But I am trying to fix a master+slave case where the wrong SOA is
answered immediately
after an update, and I followed this example to purge the cache:
mastercommunicator.cc:119
-----
for(vector<DomainInfo>::const_iterator
i=cmdomains.begin();i!=cmdomains.end();++i) {
extern PacketCache PC;
vector<string> topurge;
topurge.push_back(i->zone);
PC.purge(topurge); // fixes cvstrac ticket #30
queueNotifyDomain(i->zone,P->getBackend());
i->backend->setNotified(i->id,i->serial);
}
In this case I would think that cvstrac ticket #30 also does not
benefit from the cache-purging.
Your comments clear up the confusion, though. Thanks!
Bill Snow
More information about the Pdns-dev
mailing list