prevent unsynchronized output changes access

The raw plan output changes were stored in the output exec node, when
they should have instead been fetch lazily through the context via the
synchronized ChangesSync value.
This commit is contained in:
James Bardin
2022-04-20 14:45:58 -04:00
parent d3e660d912
commit 0fe38fba6c
3 changed files with 4 additions and 3 deletions

View File

@@ -191,6 +191,7 @@ func (cs *ChangesSync) RemoveOutputChange(addr addrs.AbsOutputValue) {
defer cs.lock.Unlock()
addrStr := addr.String()
for i, o := range cs.changes.Outputs {
if o.Addr.String() != addrStr {
continue