plugin/file: introduce snapshot()/setData() accessors for zone data (#8040)

Signed-off-by: Ryan Brewster <rpb@anthropic.com>
This commit is contained in:
rpb-ant
2026-04-12 13:34:36 -04:00
committed by GitHub
parent 8a28dc9c7d
commit 50cbaf87a0
5 changed files with 41 additions and 52 deletions

View File

@@ -36,13 +36,9 @@ func (z *Zone) Reload(t *transfer.Transfer) error {
continue
}
// copy elements we need
z.Lock()
z.Apex = zone.Apex
z.Tree = zone.Tree
z.Unlock()
z.setData(zone.Apex, zone.Tree)
log.Infof("Successfully reloaded zone %q in %q with %d SOA serial", z.origin, zFile, z.SOA.Serial)
log.Infof("Successfully reloaded zone %q in %q with %d SOA serial", z.origin, zFile, zone.SOA.Serial)
if t != nil {
if err := t.Notify(z.origin); err != nil {
log.Warningf("Failed sending notifies: %s", err)