You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While fixing some racy locking code in #5651 I realized I used a similar anti-pattern in the composition function PackagedFunctionRunner. There's a couple of places where that code:
Takes the read lock, reads some state, and releases the read lock
Computes something based on the read state
Takes the write lock, updates the state, and releases the write lock
The risk is that another Goroutine takes the write lock between when we release our read lock and take our write lock, thus invalidating the computed state we write back.
How can we reproduce it?
I guess run a lot of functions.
What environment did it happen in?
Crossplane version:
The text was updated successfully, but these errors were encountered:
What happened?
While fixing some racy locking code in #5651 I realized I used a similar anti-pattern in the composition function
PackagedFunctionRunner
. There's a couple of places where that code:The risk is that another Goroutine takes the write lock between when we release our read lock and take our write lock, thus invalidating the computed state we write back.
How can we reproduce it?
I guess run a lot of functions.
What environment did it happen in?
Crossplane version:
The text was updated successfully, but these errors were encountered: