-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: changed eventing configuration mutex to rwmutex and added missing lock #220
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <gill.skye95@gmail.com>
Signed-off-by: Skye Gill <gill.skye95@gmail.com>
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>
This PR
Changed eventing configuration mutex to rwmutex and added missing lock.
Related Issues
Fixes #219
Notes
Follow-up Tasks
How to test