fix: changed eventing configuration mutex to rwmutex and added missing lock#220
fix: changed eventing configuration mutex to rwmutex and added missing lock#220beeme1mr merged 2 commits intoopen-feature:mainfrom
Conversation
pkg/service/connect_service.go
Outdated
| for { | ||
| select { | ||
| case <-time.After(20 * time.Second): | ||
| case <-ticker.C: |
There was a problem hiding this comment.
I believe these have a similar outcome due to the wrapping for loop. Original intention was to keep this as a timeout, as we don need to send a keep alive if either the request is closed, or we send a notification (this is to prevent read/write timeouts)
|
@AlexsJones, could you please review this when you have a moment? |
|
I might be wrong here but If you have two goroutines calling the |
|
I'm not following the concern here, each invocation of
Each |
…g lock Signed-off-by: Skye Gill <[email protected]>
Signed-off-by: Skye Gill <[email protected]>
|
Is the concern that we're overwriting an already existing channel in the map? |
|
I can't see any tangible benefits to this so I defer to others. |
|
The benefit is that we're avoiding a potential race condition from writing to the same map concurrently. |
🤖 I have created a release *beep* *boop* --- ## [0.3.0](v0.2.7...v0.3.0) (2023-01-06) ### ⚠ BREAKING CHANGES * consolidated configuration change events into one event ([#241](#241)) ### Features * consolidated configuration change events into one event ([#241](#241)) ([f9684b8](f9684b8)) * support yaml evaluator ([#206](#206)) ([2dbace5](2dbace5)) ### Bug Fixes * changed eventing configuration mutex to rwmutex and added missing lock ([#220](#220)) ([5bbef9e](5bbef9e)) * omitempty targeting field in Flag structure ([#247](#247)) ([3f406b5](3f406b5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
… v1.10.4 (open-feature#220) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR
Changed eventing configuration mutex to rwmutex and added missing lock.
Related Issues
Fixes #219
Notes
Follow-up Tasks
How to test