fix: make sure to lock CopyObject for in-place updates (#10492)

This commit is contained in:
Harshavardhana
2020-09-15 20:44:48 -07:00
committed by GitHub
parent 5c47ce456e
commit 02c1a08a5b
6 changed files with 43 additions and 14 deletions

View File

@@ -426,6 +426,8 @@ func (d *dataUpdateTracker) deserialize(src io.Reader, newerThan time.Time) erro
}
// Ignore what remains on the stream.
// Update d:
d.mu.Lock()
defer d.mu.Unlock()
d.Current = dst.Current
d.History = dst.History
d.Saved = dst.Saved