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:
@@ -82,6 +82,11 @@ func (c *config) run() {
|
||||
|
||||
c.Lock()
|
||||
|
||||
if c.snap.Version >= snap.Version {
|
||||
c.Unlock()
|
||||
continue
|
||||
}
|
||||
|
||||
// save
|
||||
c.snap = snap
|
||||
|
||||
|
||||
Reference in New Issue
Block a user