aboutsummaryrefslogtreecommitdiff
path: root/plugin/file/secondary.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-08-01 12:51:37 +0000
committerGravatar Yong Tang <yong.tang.github@outlook.com> 2019-08-01 05:51:37 -0700
commita01b202b6ace52148dcfdfe8bc723878e0f911f8 (patch)
treec885cccb1756301238543eeb1bfd046db2d2902a /plugin/file/secondary.go
parent3219a2b93a8010af9b5c2263c658815a4494416e (diff)
downloadcoredns-a01b202b6ace52148dcfdfe8bc723878e0f911f8.tar.gz
coredns-a01b202b6ace52148dcfdfe8bc723878e0f911f8.tar.zst
coredns-a01b202b6ace52148dcfdfe8bc723878e0f911f8.zip
Fixes races in test and klog (#3079)
Various fixes to make things less flaky: * kubernetes: put klog.SetOutput in the setup function, not in the init function to see if that helps * file: make z.Expired a boolean instead of a pointer to a boolean * test: fix TestSecondaryZoneTransfer test, which wasn't actually testing in the right way. It's more right now, but may still be racy (race introduced because a file's lazy loading of zones) Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/file/secondary.go')
-rw-r--r--plugin/file/secondary.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/file/secondary.go b/plugin/file/secondary.go
index 408ee887a..6cb571fe5 100644
--- a/plugin/file/secondary.go
+++ b/plugin/file/secondary.go
@@ -54,7 +54,7 @@ Transfer:
z.Lock()
z.Tree = z1.Tree
z.Apex = z1.Apex
- *z.Expired = false
+ z.Expired = false
z.Unlock()
log.Infof("Transferred: %s from %s", z.origin, tr)
return nil
@@ -129,7 +129,7 @@ Restart:
if !retryActive {
break
}
- *z.Expired = true
+ z.Expired = true
case <-retryTicker.C:
if !retryActive {