Fix config watch (#1670)

* add dirty overrite test case

* need version to figure out if config need update or not

* using nanosecond as version for two goroutine can run in same second

* config should check snapshot version when update

* set checksum of ChangeSet

Co-authored-by: Asim Aslam <asim@aslam.me>
This commit is contained in:
sunfuze
2020-06-17 00:10:52 +08:00
committed by GitHub
parent 6add74b4f6
commit 2efb459c66
4 changed files with 107 additions and 24 deletions

View File

@@ -82,6 +82,11 @@ func (c *config) run() {
c.Lock()
if c.snap.Version >= snap.Version {
c.Unlock()
continue
}
// save
c.snap = snap