mirror of
https://github.com/coredns/coredns.git
synced 2026-04-20 10:55:32 -04:00
plugin/file: introduce snapshot()/setData() accessors for zone data (#8040)
Signed-off-by: Ryan Brewster <rpb@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user