1
0
mirror of https://github.com/containous/traefik.git synced 2025-10-19 07:33:17 +03:00

Fix datastore corruption on reload due to shrinking config size

This commit is contained in:
Simon Elsbrock
2017-10-30 11:22:04 +01:00
committed by Traefiker
parent 1b2cb53d4f
commit 9b5845f1cb

View File

@@ -119,19 +119,8 @@ func (d *Datastore) watchChanges() error {
func (d *Datastore) reload() error {
log.Debug("Datastore reload")
d.localLock.Lock()
err := d.kv.LoadConfig(d.meta)
if err != nil {
d.localLock.Unlock()
return err
}
err = d.meta.unmarshall()
if err != nil {
d.localLock.Unlock()
return err
}
d.localLock.Unlock()
return nil
_, err := d.Load()
return err
}
// Begin creates a transaction with the KV store.